Algorithms in C++ : parts 1-4 : fundamentals, data structures, sorting, searching - Sedgewick, Robert (Addison-Wesley, 1998)