Data structures and algorithms - AHO, Alfred V. (Massachusetts Addison-Wesley, 1983)