Add Manacher’s Algorithm for Longest Palindromic Substring#5462
Merged
alxkm merged 7 commits intoSep 24, 2024
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5462 +/- ##
============================================
+ Coverage 52.18% 52.28% +0.09%
- Complexity 3245 3255 +10
============================================
Files 524 525 +1
Lines 15156 15183 +27
Branches 2881 2887 +6
============================================
+ Hits 7909 7938 +29
+ Misses 6921 6920 -1
+ Partials 326 325 -1 ☔ View full report in Codecov by Sentry. |
alxkm
requested changes
Sep 23, 2024
- Added parameterized tests for longestPalindrome, empty cases, complex cases, and sentence palindromes. - Removed unnecessary comments for cleaner code. - Renamed variable `p` to `palindromeLengths` for clarity based on code review feedback.
ionuthodoroaga03
left a comment
Contributor
Author
There was a problem hiding this comment.
Resolved all comments. Changed files to support review.
alxkm
approved these changes
Sep 24, 2024
Member
|
Thank you for your contribution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clang-format -i --style=file path/to/your/file.javaThis PR adds Manacher's Algorithm to find the longest palindromic substring in linear time.
Closes #5453