Programming problem of the course Algorithms: Design and Analysis on Coursera