Algorithms in C++ - Sedgewick, Robert . (Addison Wesley, 1992)