Skip to content

Latest commit

 

History

History

22. Generate Parentheses

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

22.Generate Parentheses

https://leetcode.com/problems/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:

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