Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 327 Bytes

File metadata and controls

27 lines (18 loc) · 327 Bytes

Problem 22: Generate Parentheses

Difficulty: Medium

Problem

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

Example

For example, given n = 3, a solution set is:

```
[
  "((()))",
  "(()())",
  "(())()",
  "()(())",
  "()()()"
]
```