后缀Trie和后缀树

时间:2016-03-09 21:39:02

标签: java trie suffix-tree

我理解(前缀)Trie,后缀Trie和后缀树之间的区别,我正在尝试为两者编写Java代码。什么是SuffixTrieNode和SuffixTreeNode类的Java表示/结构?

SuffixTrie representation:

class SuffixTrie{
   SuffixTrieNode root;

   class SuffixTrieNode{
      SuffixTrieNode[] links;
   }
}

SuffixTree representation:

class SuffixTree{
   SuffixTreeNode root;

   class SuffixTreeNode{
      SuffixTreeNode[] links;
   }
}

谢谢!

1 个答案:

答案 0 :(得分:1)

后缀trie使用trie数据结构。这是构建后缀树的最简单方法:Suffix tree and Tries. What is the difference?