Data structures and algorithms - Aho, Alfred V, Hopcroft, John E & Ullman, Jeffrey D (Addison-Wesley Publishing Company, Massachusetts, 1983)