Skip to content

Add doctests for the boyer_moore_search algorithm. #12769

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

Merged
merged 5 commits into from
Jun 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update boyer_moore_search.py
  • Loading branch information
MaximSmolskiy authored Jun 2, 2025
commit b0cdc8d00ee7df7ea8bea9c6065334b2da438bff
2 changes: 1 addition & 1 deletion strings/boyer_moore_search.py
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ def match_in_pattern(self, char: str) -> int:
i (int): index of char from last in pattern
-1 (int): if char is not found in pattern

>>> bms = BoyerMooreSearch("ABAABA", "AB")
>>> bms = BoyerMooreSearch(text="ABAABA", pattern="AB")
>>> bms.match_in_pattern("B")
1
"""