Java
Java copied to clipboard
Add Z-Algorithm for Linear-Time String Pattern Matching
- [ 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
Codecov Report
:x: Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 78.52%. Comparing base (2c4bf3c) to head (4e0c78b).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...ain/java/com/thealgorithms/strings/ZAlgorithm.java | 90.90% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #7124 +/- ##
============================================
+ Coverage 78.51% 78.52% +0.01%
- Complexity 6752 6761 +9
============================================
Files 759 760 +1
Lines 22402 22424 +22
Branches 4400 4406 +6
============================================
+ Hits 17589 17609 +20
- Misses 4108 4110 +2
Partials 705 705
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Adds the Z-Algorithm implementation and unit tests. Includes zFunction, pattern search method, and Checkstyle-clean formatting. Reference: https://en.wikipedia.org/wiki/Z-algorithm