From Data Structures and Algorithm Analysis in Java, Weiss:
Weiss writes:
- In the leaves, we use the index where the suffix begins (as in the suffix array)
- In the internal nodes, we store the number of common characters matched from the root until the internal node; this number represents the letter depth.
My question: given the input string (e.g. 'banana') and the implicit representation of the suffix tree, what would a good algorithm for substring search look like? The algorithms I've seen assume a different representation of the tree. I'd like to do substring search without converting to a different tree representation.