Programming assignment for Coursera Algo 4 Part 1