Exercises and programming problems in Coursera Algorithm, part 1