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

feat: reactivate horspool #663

Merged
merged 5 commits into from
Oct 4, 2023
Merged

Conversation

vil02
Copy link
Member

@vil02 vil02 commented Sep 30, 2023

Description of Change

There is some commented out code in horspool.go.
This PR reactivates it by making all necessary changes.

When the given pattern is not present in the input string, I used a similar approach to the one in ./search.

Checklist

  • Added description of change
  • Added tests and example, test must pass
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:
Reactivates horspool.go.

@vil02 vil02 marked this pull request as ready for review September 30, 2023 23:21
Copy link
Member

@raklaptudirm raklaptudirm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some inline comments to the algorithm implementation explaining it as far as possible.

@vil02
Copy link
Member Author

vil02 commented Oct 2, 2023

@raklaptudirm I have added some comments and restructured the code a bit. Now it should be more readable.

@vil02 vil02 requested a review from raklaptudirm October 2, 2023 15:07
@siriak siriak merged commit a52d8bf into TheAlgorithms:master Oct 4, 2023
3 checks passed
@vil02 vil02 deleted the reactivate_horspool branch October 8, 2023 19:14
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 this pull request may close these issues.

4 participants