mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 08:21:41 +08:00
update
This commit is contained in:
16
leetcode/problem/generate-parentheses.html
Normal file
16
leetcode/problem/generate-parentheses.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<p>Given <code>n</code> pairs of parentheses, write a function to <em>generate all combinations of well-formed parentheses</em>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<pre><strong>Input:</strong> n = 3
|
||||
<strong>Output:</strong> ["((()))","(()())","(())()","()(())","()()()"]
|
||||
</pre><p><strong>Example 2:</strong></p>
|
||||
<pre><strong>Input:</strong> n = 1
|
||||
<strong>Output:</strong> ["()"]
|
||||
</pre>
|
||||
<p> </p>
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= n <= 8</code></li>
|
||||
</ul>
|
Reference in New Issue
Block a user