'Coding has over 700 languages', '67% of programming jobs aren’t in the
technology industry', 'Coding is behind almost everything that is powered
by electricity'

Topics

You are given an integer ** 'N'**, your task is to generate all combinations of well-formed parenthesis having ‘N’ pairs.

A parenthesis is called well-formed if it is balanced i.e. each left parenthesis has a matching right parenthesis and the matched pairs are well nested.

For Example:

```
For ‘N’ = 3,
All possible combinations are:
((()))
(()())
(())()
()(())
()()()
```

Detailed explanation

```
2
```

```
()()
(())
```

```
There are two possible combinations of parentheses:
()()
(())
Here both the parenthesis are balanced so the possible outputs can be [ [ ()() ],[ (()) ] ].
```

```
4
```

```
()()()()
()()(())
()(())()
()(()())
()((()))
(())()()
(())(())
(()())()
(()()())
(()(()))
((()))()
((())())
((()()))
(((())))
```

```
1 <= 'N' <= 11
Time Limit: 1 sec.
```