1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-12 17:05:15 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2025-09-29 14:43:44 +08:00
parent 2862a227c4
commit 13f2098086
4409 changed files with 168933 additions and 166256 deletions

View File

@@ -11,7 +11,7 @@
<ul>
<li>只有在两个数组中至少出现过一次的 id 才能包含在结果数组内。</li>
<li>每个 id 在结果数组中 <strong>只能出现一次</strong> ,并且其对应的值等于两个数组中该 id 所对应的值求和。如果某个数组中不存在该 id ,则认为其对应的值等于 <code>0</code></li>
<li>每个 id 在结果数组中 <strong>只能出现一次</strong> ,并且其对应的值等于两个数组中该 id 所对应的值求和。如果某个数组中不存在该 id ,则假定其对应的值等于 <code>0</code></li>
</ul>
<p>返回结果数组。返回的数组需要按 id 以递增顺序排列。</p>
@@ -20,7 +20,8 @@
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>nums1 = [[1,2],[2,3],[4,5]], nums2 = [[1,4],[3,2],[4,1]]
<pre>
<strong>输入:</strong>nums1 = [[1,2],[2,3],[4,5]], nums2 = [[1,4],[3,2],[4,1]]
<strong>输出:</strong>[[1,6],[2,3],[3,2],[4,6]]
<strong>解释:</strong>结果数组中包含以下元素:
- id = 1 ,对应的值等于 2 + 4 = 6 。
@@ -31,7 +32,8 @@
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong>nums1 = [[2,4],[3,6],[5,5]], nums2 = [[1,3],[4,3]]
<pre>
<strong>输入:</strong>nums1 = [[2,4],[3,6],[5,5]], nums2 = [[1,3],[4,3]]
<strong>输出:</strong>[[1,3],[2,4],[3,6],[4,3],[5,5]]
<strong>解释:</strong>不存在共同 id ,在结果数组中只需要包含每个 id 和其对应的值。
</pre>