|
|
|
|
|
by eindiran
2421 days ago
|
|
The underlying data structure (a trie[0]) is used to create both suffix trees and prefix trees. The 'default' trie is a prefix tree actually. The reason you would want a suffix tree (over a prefix trie) is that suffix trees are quite useful for computing the longest common substring of two strings (they can do it in linear time). [0] https://en.wikipedia.org/wiki/Trie |
|