Week 2 programming for the algorithms coursera course.