Coursera: algorithm: assignments 4