| Topic | Difficulty | Companies |
|---|---|---|
| Backtracking | MEDIUM | Facebook Microsoft |
Given n pairs of parentheses, write a program to generate all combinations of balanced parentheses. You have to return a string array containing all possible cases.
Example
Input: n = 3
Output: A solution set is
[
"((()))",
"(()())",
"(())()",
"()(())",
"()()()"
]