Skip to content

feat: Implement Raita Algorithm for string matching#651

Open
asmit27rai wants to merge 4 commits into
codezonediitj:mainfrom
asmit27rai:raita
Open

feat: Implement Raita Algorithm for string matching#651
asmit27rai wants to merge 4 commits into
codezonediitj:mainfrom
asmit27rai:raita

Conversation

@asmit27rai

Copy link
Copy Markdown

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
Copy Markdown
Author

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

Comment thread pydatastructs/strings/algorithms.py
@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