Gusfield

Algorithms on Strings, Trees, and Sequences - Cambridge University Press