Merging exercises from Coursera Algorithms Part 1 course by Princeton