Coursera: algorithms: assignments 3