Assignment 1 from the Coursera algorithms class