mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 07:21:40 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个含 <code>n</code> 个整数的数组 <code>nums</code> ,其中 <code>nums[i]</code> 在区间 <code>[1, n]</code> 内。请你找出所有在 <code>[1, n]</code> 范围内但没有出现在 <code>nums</code> 中的数字,并以数组的形式返回结果。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [4,3,2,7,8,2,3,1]\n<strong>输出:</strong>[5,6]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [1,1]\n<strong>输出:</strong>[2]\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>n == nums.length</code></li>\n\t<li><code>1 <= n <= 10<sup>5</sup></code></li>\n\t<li><code>1 <= nums[i] <= n</code></li>\n</ul>\n\n<p><strong>进阶:</strong>你能在不使用额外空间且时间复杂度为<em> </em><code>O(n)</code><em> </em>的情况下解决这个问题吗? 你可以假定返回的数组不算在额外空间内。</p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 939,
|
||||
"likes": 961,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"First Missing Positive\", \"titleSlug\": \"first-missing-positive\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u7f3a\\u5931\\u7684\\u7b2c\\u4e00\\u4e2a\\u6b63\\u6570\"}, {\"title\": \"Find All Duplicates in an Array\", \"titleSlug\": \"find-all-duplicates-in-an-array\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6570\\u7ec4\\u4e2d\\u91cd\\u590d\\u7684\\u6570\\u636e\"}]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"177.2K\", \"totalSubmission\": \"270.9K\", \"totalAcceptedRaw\": 177227, \"totalSubmissionRaw\": 270884, \"acRate\": \"65.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"187K\", \"totalSubmission\": \"285.8K\", \"totalAcceptedRaw\": 187005, \"totalSubmissionRaw\": 285819, \"acRate\": \"65.4%\"}",
|
||||
"hints": [
|
||||
"This is a really easy problem if you decide to use additional memory. For those trying to write an initial solution using additional memory, think <b>counters!</b>",
|
||||
"However, the trick really is to not use any additional space than what is already available to use. Sometimes, multiple passes over the input array help find the solution. However, there's an interesting piece of information in this problem that makes it easy to re-use the input array itself for the solution.",
|
||||
|
Reference in New Issue
Block a user