1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (English)/数对和(English) [pairs-with-sum-lcci].html

21 lines
575 B
HTML

<p>Design an algorithm to find all pairs of integers within an array which sum to a specified value.</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> nums = [5,6,5], target = 11
<strong>Output: </strong>[[5,6]]</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> nums = [5,6,5,6], target = 11
<strong>Output: </strong>[[5,6],[5,6]]</pre>
<p><strong>Note: </strong></p>
<ul>
<li><code>nums.length &lt;= 100000</code></li>
<li><code>-10^5 &lt;= nums[i], target &lt;= 10^5</code></li>
</ul>