Programming homework for Coursera Algorithms, Part I class, https://class.coursera.org/algs4partI-005.