mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 14:12:17 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你两个整数数组 <code>nums</code> 和 <code>index</code>。你需要按照以下规则创建目标数组:</p>\n\n<ul>\n\t<li>目标数组 <code>target</code> 最初为空。</li>\n\t<li>按从左到右的顺序依次读取 <code>nums[i]</code> 和 <code>index[i]</code>,在 <code>target</code> 数组中的下标 <code>index[i]</code> 处插入值 <code>nums[i]</code> 。</li>\n\t<li>重复上一步,直到在 <code>nums</code> 和 <code>index</code> 中都没有要读取的元素。</li>\n</ul>\n\n<p>请你返回目标数组。</p>\n\n<p>题目保证数字插入位置总是存在。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>nums = [0,1,2,3,4], index = [0,1,2,2,1]\n<strong>输出:</strong>[0,4,1,3,2]\n<strong>解释:</strong>\nnums index target\n0 0 [0]\n1 1 [0,1]\n2 2 [0,1,2]\n3 2 [0,1,3,2]\n4 1 [0,4,1,3,2]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>nums = [1,2,3,4,0], index = [0,1,2,3,0]\n<strong>输出:</strong>[0,1,2,3,4]\n<strong>解释:</strong>\nnums index target\n1 0 [1]\n2 1 [1,2]\n3 2 [1,2,3]\n4 3 [1,2,3,4]\n0 0 [0,1,2,3,4]\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>nums = [1], index = [0]\n<strong>输出:</strong>[1]\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= nums.length, index.length <= 100</code></li>\n\t<li><code>nums.length == index.length</code></li>\n\t<li><code>0 <= nums[i] <= 100</code></li>\n\t<li><code>0 <= index[i] <= i</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 51,
|
||||
"likes": 53,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"30.4K\", \"totalSubmission\": \"36.5K\", \"totalAcceptedRaw\": 30381, \"totalSubmissionRaw\": 36524, \"acRate\": \"83.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"31K\", \"totalSubmission\": \"37.3K\", \"totalAcceptedRaw\": 30975, \"totalSubmissionRaw\": 37278, \"acRate\": \"83.1%\"}",
|
||||
"hints": [
|
||||
"Simulate the process and fill corresponding numbers in the designated spots."
|
||||
],
|
||||
|
Reference in New Issue
Block a user