Algorithms on Strings, Trees, and Sequences