codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
199 stars 270 forks source link

Implement Boyer-Moore algorithm #519

Closed Abekaesh closed 1 year ago

Abekaesh commented 1 year ago

Fixes #463

Brief description of what is fixed or changed

Boyer Moore algorithm is implemented. It is a string matching algorithm which has 2 arguments namely: text, pattern and returns an Array of positions where pattern is found. If pattern is not found in text, then it returns an empty array.

czgdp1807 commented 1 year ago

Looks good but please add a test in https://github.com/codezonediitj/pydatastructs/blob/main/pydatastructs/strings/tests/test_algorithms.py

Abekaesh commented 1 year ago

I have added test as said. Are there any more corrections to be made?

codecov[bot] commented 1 year ago

Codecov Report

Merging #519 (78e1a88) into main (8c41795) will increase coverage by 0.009%. The diff coverage is 100.000%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #519 +/- ## ============================================= + Coverage 98.530% 98.539% +0.009% ============================================= Files 32 32 Lines 4014 4039 +25 ============================================= + Hits 3955 3980 +25 Misses 59 59 ``` | [Impacted Files](https://codecov.io/gh/codezonediitj/pydatastructs/pull/519?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj) | Coverage Δ | | |---|---|---| | [pydatastructs/strings/algorithms.py](https://codecov.io/gh/codezonediitj/pydatastructs/pull/519?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj#diff-cHlkYXRhc3RydWN0cy9zdHJpbmdzL2FsZ29yaXRobXMucHk=) | `100.000% <100.000%> (ø)` | | [![Impacted file tree graph](https://codecov.io/gh/codezonediitj/pydatastructs/pull/519/graphs/tree.svg?width=650&height=150&src=pr&token=mZMqq5ubAu&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj)](https://codecov.io/gh/codezonediitj/pydatastructs/pull/519?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codezonediitj)