Algorithms Part 1, Assignment 2