Please sign in to comment.
SuffixTree: insert_ukkonen: Use a hash table of suffix links.
Instead of storing them in the Nodes. This avoids wasting space that we only need during construction, and which we'd like to discard after construction. Note that the hash table (std::unordered_map) insert and lookup are now only amortized constant time, and could become linear, whereas just setting and getting from the node was very fast constant time. So this makes this Ukkonen implementation no longer truly O(m).
- Loading branch information...