Given n = 2, generate all combinations of well-formed parentheses. Return the result sorted lexicographically.
generateParentheses(2) => ["(())", "()()"]
Waiting for you...
CodeBot will comment on your code as you write...
Click "Run Code" or press Ctrl+Enter to test your solution