New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"mississippi" gives "issi" instead of "ssi" as longest repeated substring #4
Comments
Isn't "issi" actually the longest repeated substring? |
I'd say "ississi" doesn't contain "issi" twice. |
The way it is implemented at the moment, just gives the longest repeated substring path of thedeepest internal node. This may lead to an overlapping result. |
My expectation obviously was "no overlapping" as there are not "enough" characters to actually write down the repeated substrings. That's why I'd prefer a default of `allow_overlapping = false``. As this is a library l'd prefer two methods (and maybe a private one with the boolean flag to not repeat yourself). Not sure about naming though. :-D |
Wouldn't 'iss' be the longest repeated substring matched ahead of 'ssi' in a non-overlapping context? |
@MrHash: yes, as the substrings are built from prefixes of each suffix (l2r), "iss" will win over "ssi". |
Expected
ssi
instead ofissi
for inputmississippi
.The text was updated successfully, but these errors were encountered: