diff options
Diffstat (limited to 'ass2/q2/suffix_array.py')
| -rw-r--r-- | ass2/q2/suffix_array.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ass2/q2/suffix_array.py b/ass2/q2/suffix_array.py index db22c3e..eccc99e 100644 --- a/ass2/q2/suffix_array.py +++ b/ass2/q2/suffix_array.py @@ -159,6 +159,7 @@ def suffix_tree(string): Node.global_end += 1 # Rule 1s implicitly for j in range(last_j + 1, i + 1): print(string[0:i + 1], end=": ") + print(active_node, active_edge, active_length) # if 2 or more letter string, just match the last character at the current position (we already went # there) i.e. i i think char = string[i] if i - j <= 1 else string[i] @@ -196,4 +197,4 @@ def suffix_tree(string): print("\n" * 10) -suffix_tree("abacabad$") +suffix_tree("abcabxabcd") |
