leetcode icon indicating copy to clipboard operation
leetcode copied to clipboard

Update 22-generate-parentheses.cpp

Open Steven-Yiran opened this issue 2 years ago • 0 comments

  • 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.

Steven-Yiran avatar Mar 27 '23 22:03 Steven-Yiran