mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
16 lines
297 B
HTML
16 lines
297 B
HTML
<p>括号。设计一种算法,打印n对括号的所有合法的(例如,开闭一一对应)组合。</p>
|
||
|
||
<p>说明:解集不能包含重复的子集。</p>
|
||
|
||
<p>例如,给出 n = 3,生成结果为:</p>
|
||
|
||
<pre>
|
||
[
|
||
"((()))",
|
||
"(()())",
|
||
"(())()",
|
||
"()(())",
|
||
"()()()"
|
||
]
|
||
</pre>
|