You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ But differently, the new `end_idxes` property in the `STree` indicates the index
74
74
75
75
So, back to the topic, how does this tree solve the longest common substring problem?
76
76
77
-
In the `Application.py`, the `lcs2` function find the lcs of two strings. The method `build_with_automatic_end` in the `STree` will concatenate a list of strings with the ending characters *"$"*, and construct a suffix tree. The `lcs2` function will traverse the tree and find the deepest non-leaf node that contains the leaf nodes of all string indexes in the string list.
77
+
In the `Application.py`, the `lcs2` function find the lcs of two strings. The method `build_with_automatic_end` in the `STree` will concatenate a list of strings with the ending characters *"$"*, and construct a suffix tree. With the help of `end_idxes`, these *"$"* are different and they represent the end of different strings. `STree` will automatically treat these *"$"* as different from other characters, so the character *"$"* itself is just designed for readability of suffix tree printing. The `lcs2` function will traverse the tree and find the deepest non-leaf node that contains the leaf nodes of all string indexes in the string list.
78
78
79
79
Similarly, it can also be demonstrated using the following codes in `Application.py`
0 commit comments