https://class.coursera.org/algs4partI-004/assignment/view?assignment_id=6