Robert Sedgewick and Kevin Wayne - Algorithms, 4th edition, Java implementation