Stanford Algo&Analysis 2: Completed Programming Assignment 1