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: Implement Raita Algorithm for string matching #651

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

asmit27rai
Copy link

Implement Raita Algorithm for String Matching

Description

This PR adds the Raita Algorithm to the pydatastructs.strings.algorithms module. The Raita algorithm is a variation of the Boyer-Moore algorithm and is efficient for single pattern matching with an average-case complexity of O(n + m).

Changes

  1. Added the _raita function to pydatastructs/strings/algorithms.py.
  2. Updated the find function to include the raita algorithm.
  3. Added test cases for the Raita algorithm in tests/test_strings.py.

Fixes: #650

- Added `_raita` function to `pydatastructs/strings/algorithms.py`.
- Updated `find` function to support the `raita` algorithm.
- Added test cases for the Raita algorithm in `tests/test_strings.py`.
- Ensured compatibility with existing string matching algorithms.
@asmit27rai
Copy link
Author

@Kishan-Ved @czgdp1807 Pls review this PR...

@asmit27rai asmit27rai requested a review from czgdp1807 March 19, 2025 08:12
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.

Raita Algorithm for String Matching
2 participants