-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Changed knuth_morris_pratt to be consistent with str.find() #9079
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
Conversation
Change |
In your PR description, you should tick whatever suits your PR but don't delete other checkboxes, also tick that checkbox for bug fixing or doc change which u deleted. |
Co-authored-by: Rohan Anand <[email protected]>
@cclauss , kindly review it. |
Thanks. "doctests" are more desirable than print statements. While we're at it, let's write some tests instead. |
Just to note, you can use some keywords in your commit message to link a pull request to an issue, that way if your PR is accepted, the linked issue gets closed automatically. https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
for more information, see https://pre-commit.ci
I added doctests that fail...
As discussed in CONTRIBUTING.md, you can run these on your own computer with: |
while testing the doctests added by @cclauss with existing code of |
If we are going to be consistent with |
Describe your change:
function kmp() now returns the first occurrence of the pattern. If the pattern does not exist in the given text, it returns -1
See #9077
Checklist: