Coursera Algorithms Part 1, assignment of week 1