✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Tries and suffix trees
Assume we have one fixed text T of length n and many patterns to look for, each of length m. Searching T for a single pattern with a linear-time matching algorithm costs Θ(n + m). How does building the suffix tree of T once improve on that?