Coursera: algorithm: assignments 3