Medium
Generate all valid parenthesis strings of length 2n.
Return every valid combination of n pairs of parentheses.
Examples
Input: n = 3
Output: ["((()))","(()())","(())()","()(())","()()()"]
Constraints
- 1 <= n
Coding Challenge
Generate all valid parenthesis strings of length 2n.
Return every valid combination of n pairs of parentheses.
Input: n = 3
Output: ["((()))","(()())","(())()","()(())","()()()"]
Preparing your coding workspace...