Closed nijilong1224 closed 5 years ago
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
[ "((()))", "(()())", "(())()", "()(())", "()()()" ]
[x] code submit by yuyang
[x] code submit by jinglonz
[ ] discuss
https://github.com/LeeMax117/LeetCode_practise/blob/master/Jinglong/generateParenthesis.py
https://github.com/LeeMax117/LeetCode_practise/blob/master/LeeMax/22_Generate_Parentheses.py
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
[ "((()))", "(()())", "(())()", "()(())", "()()()" ]
[x] code submit by yuyang
[x] code submit by jinglonz
[ ] discuss