Programming assignments of Coursera Algorithm Part 2