1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -1,11 +1,11 @@
<p>Given an array of <strong>distinct</strong> integers <code>candidates</code> and a target integer <code>target</code>, return <em>a list of all <strong>unique combinations</strong> of </em><code>candidates</code><em> where the chosen numbers sum to </em><code>target</code><em>.</em> You may return the combinations in <strong>any order</strong>.</p>
<p>The <strong>same</strong> number may be chosen from <code>candidates</code> an <strong>unlimited number of times</strong>. Two combinations are unique if the frequency of at least one of the chosen numbers is different.</p>
<p>The <strong>same</strong> number may be chosen from <code>candidates</code> an <strong>unlimited number of times</strong>. Two combinations are unique if the <span data-keyword="frequency-array">frequency</span> of at least one of the chosen numbers is different.</p>
<p>It is <strong>guaranteed</strong> that the number of unique combinations that sum up to <code>target</code> is less than <code>150</code> combinations for the given input.</p>
<p>The test cases are generated such that the number of unique combinations that sum up to <code>target</code> is less than <code>150</code> combinations for the given input.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<p><strong class="example">Example 1:</strong></p>
<pre>
<strong>Input:</strong> candidates = [2,3,6,7], target = 7
@@ -16,14 +16,14 @@
These are the only two combinations.
</pre>
<p><strong>Example 2:</strong></p>
<p><strong class="example">Example 2:</strong></p>
<pre>
<strong>Input:</strong> candidates = [2,3,5], target = 8
<strong>Output:</strong> [[2,2,2,2],[2,3,3],[3,5]]
</pre>
<p><strong>Example 3:</strong></p>
<p><strong class="example">Example 3:</strong></p>
<pre>
<strong>Input:</strong> candidates = [2], target = 1
@@ -35,7 +35,7 @@ These are the only two combinations.
<ul>
<li><code>1 &lt;= candidates.length &lt;= 30</code></li>
<li><code>1 &lt;= candidates[i] &lt;= 200</code></li>
<li><code>2 &lt;= candidates[i] &lt;= 40</code></li>
<li>All elements of <code>candidates</code> are <strong>distinct</strong>.</li>
<li><code>1 &lt;= target &lt;= 500</code></li>
<li><code>1 &lt;= target &lt;= 40</code></li>
</ul>