Skip to content

Add TwoPointerPalindrome.java with tAdd TwoPointerPalindrome.java using two-pointer techniqueest cases and comments #6294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

sushma0515
Copy link

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

✨ Description:

  • Implemented TwoPointerPalindrome.java to check for palindrome using two-pointer technique.
  • Added detailed inline comments for beginner understanding.
  • Created matching unit test class TwoPointerPalindromeTest.java.
  • Contribution for learning and helping others understand DSA techniques in Java.

🔗 Algorithm reference: https://en.wikipedia.org/wiki/Palindrome

@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2025

Codecov Report

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

Project coverage is 74.10%. Comparing base (a21abe6) to head (52b8f86).

Files with missing lines Patch % Lines
...om/thealgorithms/strings/TwoPointerPalindrome.java 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6294   +/-   ##
=========================================
  Coverage     74.10%   74.10%           
+ Complexity     5345     5339    -6     
=========================================
  Files           677      677           
  Lines         18639    18638    -1     
  Branches       3618     3617    -1     
=========================================
  Hits          13812    13812           
  Misses         4272     4272           
+ Partials        555      554    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siriak
Copy link
Member

siriak commented Jun 16, 2025

What is the reason for the change? There were already 3 versions of this algorithm implemented including two pointer version

@sushma0515
Copy link
Author

sushma0515 commented Jun 16, 2025 via email

@siriak
Copy link
Member

siriak commented Jun 16, 2025

We don't need to add it because the same algorithm is already implemented

@siriak siriak closed this Jun 16, 2025
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.

3 participants