1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-23 05:48:57 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 16:56:27 +08:00
parent e730aa6794
commit ad15da05aa
2517 changed files with 7358 additions and 7332 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>给你一个按 <strong>非递减顺序</strong> 排序的整数数组 <code>nums</code>,返回 <strong>每个数字的平方</strong> 组成的新数组,要求也按 <strong>非递减顺序</strong> 排序。</p>\n\n<ul>\n</ul>\n\n<p> </p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [-4,-1,0,3,10]\n<strong>输出:</strong>[0,1,9,16,100]\n<strong>解释:</strong>平方后,数组变为 [16,1,0,9,100]\n排序后数组变为 [0,1,9,16,100]</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [-7,-3,2,3,11]\n<strong>输出:</strong>[4,9,9,49,121]\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code><span>1 <= nums.length <= </span>10<sup>4</sup></code></li>\n\t<li><code>-10<sup>4</sup> <= nums[i] <= 10<sup>4</sup></code></li>\n\t<li><code>nums</code> 已按 <strong>非递减顺序</strong> 排序</li>\n</ul>\n\n<p> </p>\n\n<p><strong>进阶:</strong></p>\n\n<ul>\n\t<li>请你<span style=\"color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">设计时间复杂度为 <code>O(n)</code> 的算法解决本问题</span></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 477,
"likes": 482,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Merge Sorted Array\", \"titleSlug\": \"merge-sorted-array\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u5408\\u5e76\\u4e24\\u4e2a\\u6709\\u5e8f\\u6570\\u7ec4\"}, {\"title\": \"Sort Transformed Array\", \"titleSlug\": \"sort-transformed-array\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6709\\u5e8f\\u8f6c\\u5316\\u6570\\u7ec4\"}]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"291.3K\", \"totalSubmission\": \"422K\", \"totalAcceptedRaw\": 291279, \"totalSubmissionRaw\": 422013, \"acRate\": \"69.0%\"}",
"stats": "{\"totalAccepted\": \"293K\", \"totalSubmission\": \"424.5K\", \"totalAcceptedRaw\": 293003, \"totalSubmissionRaw\": 424519, \"acRate\": \"69.0%\"}",
"hints": [],
"solution": {
"id": "127",