5 Comments


  1. 实际上可以用后缀树的办法进一步把时间复杂度降到O(n)或者O(n log n)级,而且适合任意多个字符串的最长公共字串问题。

    1. Author

      是的,后缀树的时间复杂度可以降到O(n),空间复杂度也只有O(n)。所以常说选择合适的数据结构对解决同样的问题有很大的影响。


Leave a Reply to itfanr Cancel reply

Your email address will not be published.