✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Let S be a string in which some substring occurs at least twice. You build the suffix tree of S, with the terminator $ appended to S first. A node of the tree spells the characters on the path from the root down to it.
Which node spells a longest substring that occurs at least twice in S?