带后缀树的最短不可重复子串

Shortest not repeatable Substring with Suffix-Tree

我需要设计一个高效的算法来找到文本中的最短不可重复子串。在本质上;在文本中只出现一次的最短字符串。这必须 仅使用后缀树

示例 1:

Text: AATGCCTA 然后 Result: G

示例 2:

Text: AAAAGGGG 然后 Result: AG

短不可重复子串是所有后缀中最短的唯一前缀。

参见 Lucian Ilie 的 Minimum Unique Substrings and Maximum Repeats 和 W. F. Smyth。