Skip to content

Latest commit

 

History

History

0022

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

题目

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:

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

题目大意

给定括号数,写一个函数,列出所有正确格式的括号组合。

解题思路