Coursera's Algorithms: Design and Analysis, Part 2 homework.