Algorithms from the book Grokking Algorithms