mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 05:26:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>数组<code>nums</code>包含从<code>0</code>到<code>n</code>的所有整数,但其中缺了一个。请编写代码找出那个缺失的整数。你有办法在O(n)时间内完成吗?</p>\n\n<p><strong>注意:</strong>本题相对书上原题稍作改动</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>[3,0,1]\n<strong>输出:</strong>2</pre>\n\n<p> </p>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>[9,6,4,2,3,5,7,0,1]\n<strong>输出:</strong>8\n</pre>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 59,
|
||||
"likes": 63,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -161,7 +161,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"34.3K\", \"totalSubmission\": \"54.5K\", \"totalAcceptedRaw\": 34311, \"totalSubmissionRaw\": 54546, \"acRate\": \"62.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"36K\", \"totalSubmission\": \"57.5K\", \"totalAcceptedRaw\": 35993, \"totalSubmissionRaw\": 57499, \"acRate\": \"62.6%\"}",
|
||||
"hints": [
|
||||
"你需要多长时间才能算出缺失数字的最小有效位?",
|
||||
"要找到缺失的数字中的最小有效位,你其实知道有多少个 0 和 1。例如,如果你看到最小有效位有 3 个 0 和 3 个 1,那么缺失的数字的最小值必定是 1。想想看:在任何 0 和 1 的序列中,你会得到 0,然后是 1,然后又是 0,然后又是 1,以此类推。",
|
||||
|
Reference in New Issue
Block a user