leetcode
leetcode copied to clipboard
Update 22-generate-parentheses.cpp
- File(s) Modified: 0022-generate-parentheses.cpp
- Language(s) Used: C++
- Submission URL: https://leetcode.com/problems/generate-parentheses/submissions/923295858/
Notes
The generate parentheses problem is grouped under the stack category on the Roadmap. However, the given solution to the problem uses a recursion approach, which is only covered further down the Roadmap in the Backtracking section. I have added an efficient, succinct stack solution to this problem to better illustrate the use of stack data structure. I believe this change is necessary for learners following the learning Roadmap.
Important
Please make sure the file name is lowercase and a duplicate file does not already exist before merging.