I understand the difference between (Prefix) Trie, a Suffix Trie and a Suffix Tree and I am trying to write Java code for both. What is the Java representation/structure of the SuffixTrieNode and SuffixTreeNode class?
SuffixTrie representation:
class SuffixTrie{
SuffixTrieNode root;
class SuffixTrieNode{
SuffixTrieNode[] links;
}
}
SuffixTree representation:
class SuffixTree{
SuffixTreeNode root;
class SuffixTreeNode{
SuffixTreeNode[] links;
}
}
Thanks!!
A suffix trie uses a trie data structure. It is the simplest way to build a suffix tree:Suffix tree and Tries. What is the difference?.