Java icon indicating copy to clipboard operation
Java copied to clipboard

Rabin karp algo

Open Lohit-pro opened this issue 1 year ago • 2 comments
trafficstars

  • [x] I have read CONTRIBUTING.md.
  • [x] This pull request is all my own work -- I have not plagiarized it.
  • [x] All filenames are in PascalCase.
  • [x] All functions and variable names follow Java naming conventions.
  • [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [x] All new code is formatted with clang-format -i --style=file path/to/your/file.java

Lohit-pro avatar Aug 28 '24 04:08 Lohit-pro

Codecov Report

Attention: Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

Project coverage is 52.13%. Comparing base (648572a) to head (1f73373).

Files with missing lines Patch % Lines
...ithms/strings/PatternSearchUsingRabinKarpAlgo.java 96.15% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5425      +/-   ##
============================================
+ Coverage     52.05%   52.13%   +0.07%     
- Complexity     3240     3249       +9     
============================================
  Files           524      525       +1     
  Lines         15181    15207      +26     
  Branches       2888     2897       +9     
============================================
+ Hits           7903     7928      +25     
  Misses         6955     6955              
- Partials        323      324       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 28 '24 04:08 codecov-commenter

Hey regarding the previous comment on my previous closed PR @alxkm , my implementation improves the Rabin-Karp algorithm by more modularity with well-structured methods, making the code more readable and maintainable. It includes input error handlings to prevent runtime errors from edge cases like empty strings.. I faced small small errors after committing so there are more commits :)

Lohit-pro avatar Aug 28 '24 04:08 Lohit-pro

There are already two implementations:

vil02 avatar Sep 16 '24 17:09 vil02

There are already two implementations:

👀why there are two implementations then? just asking 😀 is it allowed? if yes, make this the third one :)

Lohit-pro avatar Sep 16 '24 17:09 Lohit-pro

👀why there are two implementations then?

No idea.

is it allowed?

No.

EDIT: Since you have a fresh knowledge about Rabin-Karp algorithm feel free to take care of this duplication, i.e.:

  • select the better one,
  • tidy-up it a bit,
  • add some test cases.

vil02 avatar Sep 17 '24 15:09 vil02

Yeah, you can improve the existing algo, I can not add this algo, it already exists.

BamaCharanChhandogi avatar Sep 17 '24 15:09 BamaCharanChhandogi