The Design and analysis computer algorithms - Aho, Alfred (Addison-Wesley Pub., 1974)