Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add longest-valid-parentheses #3038

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

Open
shimmer12 wants to merge 2 commits into TheAlgorithms:master
base: master
Choose a base branch
Loading
from shimmer12:patch-1

Conversation

@shimmer12
Copy link

@shimmer12 shimmer12 commented Oct 11, 2025
edited
Loading

Description of Change

  • Added implementation of Longest Valid Parentheses using Dynamic Programming.
  • Provided detailed Doxygen-style documentation explaining the approach, logic, and example.
  • Included a concise version of the algorithm for comparison.
  • Added test cases in the main() function to demonstrate correctness and usage.
  • Ensured adherence to C++17 standards and repository coding guidelines.

Checklist

  • Added description of change
  • File name matches File name guidelines
  • Added tests and examples; all tests pass
  • Added documentation so that the program is self-explanatory and educational — Doxygen guidelines
  • Relevant documentation/comments added or updated
  • PR title follows semantic commit guidelines
  • Verified no duplicate implementations exist for the same problem
  • Acknowledge that all contributions are made under the project’s license

Notes:
Added the Longest Valid Parentheses (DP Approach) implementation under dynamic_programming/ with comprehensive documentation and examples for educational clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Panquesito7 Panquesito7 Awaiting requested review from Panquesito7 Panquesito7 is a code owner

@realstealthninja realstealthninja Awaiting requested review from realstealthninja realstealthninja is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /