Programming

Implementing a BST in F#

Binary Search Trees (BST) seem to be a hot topic in technical interviews. So, in order to help me prepare for all these grilling technical tests, I thought I’d give it a crack at implementing insertion, deletion and verification logic since I’ve already done both breath-first and depth-first traversals.   Verification Starting with something nice and …

Implementing a BST in F# Read More »

Advent of Code F# – Day 9

ps. look out for all my other solutions for Advent of Code challenges here.   Day 9 See details of the challenge here. The input for today’s challenge is a very long string like this: (6×9)JUORKH(10×13)LNWIKDMACM(126×14)(21×8)QLKUJNVVZIQGGFCJZMPHK(2×1)ZH(59×3)(38×14)KELEPIDYLCGJUBCXACRSOCEZYXLO… First, let’s see how we’re gonna parse this input. The approach I went with is to recursively split the input …

Advent of Code F# – Day 9 Read More »

Ransom Note problem in F#

A problem that has shown up multiple times in my preparation for technical interviews is the so called Ransom Note problem. To solve this in F# is pretty simple. In the interest of efficiency I decided to use a mutable Dictionary instead of the F# Map to store the no. of times a letter appears in the …

Ransom Note problem in F# Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close