Problem Description
Given an integer A pairs of parentheses, write a function to generate all combinations of well-formed parentheses of length 2*A.
1 <= A <= 10
First and only argument is integer A.
Return a sorted list of all possible parenthesis.
Input 1:
A = 3
Input 2:
A = 1
Output 1:
[ "((()))", "(()())", "(())()", "()(())", "()()()" ]
Output 2:
[ "()" ]
Explanation 1:
All paranthesis are given in the output list.
Explanation 2:
All paranthesis are given in the output list.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.