Solutions to Stanford's "Algorithms: Design and Analysis, Part 1" programming assignments