mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-21 13:06:47 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>一个整数数组 <code>original</code> 可以转变成一个 <strong>双倍</strong> 数组 <code>changed</code> ,转变方式为将 <code>original</code> 中每个元素 <strong>值乘以 2 </strong>加入数组中,然后将所有元素 <strong>随机打乱</strong> 。</p>\n\n<p>给你一个数组 <code>changed</code> ,如果 <code>change</code> 是 <strong>双倍</strong> 数组,那么请你返回 <code>original</code>数组,否则请返回空数组。<code>original</code> 的元素可以以 <strong>任意</strong> 顺序返回。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><b>输入:</b>changed = [1,3,4,2,6,8]\n<b>输出:</b>[1,3,4]\n<b>解释:</b>一个可能的 original 数组为 [1,3,4] :\n- 将 1 乘以 2 ,得到 1 * 2 = 2 。\n- 将 3 乘以 2 ,得到 3 * 2 = 6 。\n- 将 4 乘以 2 ,得到 4 * 2 = 8 。\n其他可能的原数组方案为 [4,3,1] 或者 [3,1,4] 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><b>输入:</b>changed = [6,3,0,1]\n<b>输出:</b>[]\n<b>解释:</b>changed 不是一个双倍数组。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><b>输入:</b>changed = [1]\n<b>输出:</b>[]\n<b>解释:</b>changed 不是一个双倍数组。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= changed.length <= 10<sup>5</sup></code></li>\n\t<li><code>0 <= changed[i] <= 10<sup>5</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 18,
|
||||
"likes": 19,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"4.4K\", \"totalSubmission\": \"13.7K\", \"totalAcceptedRaw\": 4441, \"totalSubmissionRaw\": 13704, \"acRate\": \"32.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"4.5K\", \"totalSubmission\": \"13.8K\", \"totalAcceptedRaw\": 4455, \"totalSubmissionRaw\": 13750, \"acRate\": \"32.4%\"}",
|
||||
"hints": [
|
||||
"If changed is a doubled array, you should be able to delete elements and their doubled values until the array is empty.",
|
||||
"Which element is guaranteed to not be a doubled value? It is the smallest element.",
|
||||
|
Reference in New Issue
Block a user