Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Latest commit

 

History

History

22

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

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:

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