Skip to content

Files

Latest commit

Aug 8, 2018
8b8d213 · Aug 8, 2018

History

History

0022.generate-parentheses

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 7, 2018
Aug 8, 2018
Aug 7, 2018

22.Generate Parentheses

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

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

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