Skip to content

refactor: optimize ValidParentheses methods and add parameterized tests - #6352

Merged
siriak merged 3 commits into
TheAlgorithms:masterfrom
alxkm:refactor/valid_parenteses
Jul 8, 2025
Merged

refactor: optimize ValidParentheses methods and add parameterized tests#6352
siriak merged 3 commits into
TheAlgorithms:masterfrom
alxkm:refactor/valid_parenteses

Conversation

@alxkm

@alxkm alxkm commented Jul 7, 2025

Copy link
Copy Markdown
Member
  • Simplified stack-based logic for better readability and efficiency
  • Combined similar validation approaches into clearer methods
  • Added parameterized tests covering diverse valid and invalid cases
  • Improved error handling for unexpected characters with informative exceptions
  • 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

@codecov-commenter

codecov-commenter commented Jul 7, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.62%. Comparing base (fa2ca9d) to head (2588cdc).
⚠️ Report is 381 commits behind head on master.

Files with missing lines Patch % Lines
...va/com/thealgorithms/strings/ValidParentheses.java 60.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6352      +/-   ##
============================================
+ Coverage     74.60%   74.62%   +0.01%     
+ Complexity     5453     5449       -4     
============================================
  Files           682      682              
  Lines         19030    19017      -13     
  Branches       3683     3677       -6     
============================================
- Hits          14198    14191       -7     
+ Misses         4270     4269       -1     
+ Partials        562      557       -5     

☔ 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
siriak merged commit 6c30495 into TheAlgorithms:master Jul 8, 2025
6 of 7 checks passed
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