-
-
Notifications
You must be signed in to change notification settings - Fork 47.6k
Add/generate parentheses iterative approach #10024
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
Add/generate parentheses iterative approach #10024
Conversation
When would we want to use this algorithm? |
The algorithm is used when you must generate valid parentheses combinations of length n, especially for tasks like code syntax validation and expression parsing. It's memory-efficient, safer for large n, and performs better with a reduced function call overhead, making it suitable for tasks with tight memory constraints. |
Hey @cclauss Can you please review this pull request and suggest any changes before merging? |
@tianyizheng02 Do you have an interest in this? |
@tianyizheng02 Can you please review it. |
Describe your change:
This PR adds the generate parentheses program using an iterative approach to the backtracking folder.
Fixes #9920
Checklist: