Source code of Algorithms by Kevin Wayne, Robert Sedgewick