Skip to content
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

matchRabinKarp, strange bug #36

Closed
mukund109 opened this issue Aug 28, 2019 · 0 comments · Fixed by #37
Closed

matchRabinKarp, strange bug #36

mukund109 opened this issue Aug 28, 2019 · 0 comments · Fixed by #37

Comments

@mukund109
Copy link
Contributor

mukund109 commented Aug 28, 2019

matchRabinKarp( "\"123456\"", "123456") = -1
matchRabinKarp( "\"aaaaaa\"", "aaaaaa") = -1
matchRabinKarp( "??????\"beebop\"??????????????", "beebop") = -1

(6 until 60 by 6).map( n => matchRabinKarp("\"" + "c"*n + "\"", "c"*n )) = Vector( -1, -1, ... -1 )

vkostyukov added a commit that referenced this issue Apr 26, 2021
Fixes bug #36 and handles edge case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant