Algorithms. Mainly to document my understanding