Problem 139: Yet another application of suffix trees |
In this problem, we show how the Suffix tree of a word can be used in three different ways to solve an example problem. For a string $x$, let $\Sub[k]$ denote the number of (distinct) nonempty factors of $x$ having an occurrence whose position starts in the interval $[0\dd k]$. For simplicity, assume that $x$ ends with a unique symbol.