Ukkonen-s-Suffix-Tree-Algorithm icon indicating copy to clipboard operation
Ukkonen-s-Suffix-Tree-Algorithm copied to clipboard

Ukkonen's suffix tree algorithm, a complete version implemented in Python

Results 4 Ukkonen-s-Suffix-Tree-Algorithm issues
Sort by recently updated
recently updated
newest added

There is a copy of list in [unfold function](https://github.com/mutux/Ukkonen-s-Suffix-Tree-Algorithm/blob/e4578e4be99443a0c3c33d308fc53ef894e76c7d/suffixtree.py#L158). It leads to `O(len(remains))` time complexity for this operation. And due to being inside `while remainder > 0` this gains O(n^2)...

I tried to translate to Python 3 but the meaning of the double parentheses in the `setoutedge` definition eludes me. def setoutedge(self, key, (anode, label_start_index, label_end_index, bnode)): I guessed it...

When a leaf node is split, the parentkey of existing node is not updated to point to internal node. This needs to be added: `bnode.setparentkey((newnode, chars[start + actlen]))` Here's a...