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

1-based indexing in kmp algorithm #12

Open
swapnil159 opened this issue Aug 27, 2018 · 0 comments
Open

1-based indexing in kmp algorithm #12

swapnil159 opened this issue Aug 27, 2018 · 0 comments

Comments

@swapnil159
Copy link

I ran the kmp function on the following strings-
p="wa" and t="swapwap"
The function returned 3 and 6 as positions but according to 0-based indexing as mentioned, it should return 2 and 5.
So i think you should change the description or i-l should be i-l-1

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

No branches or pull requests

1 participant