mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 08:21:41 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>在一个整数数组中,“峰”是大于或等于相邻整数的元素,相应地,“谷”是小于或等于相邻整数的元素。例如,在数组{5, 8, 4, 2, 3, 4, 6}中,{8, 6}是峰, {5, 2}是谷。现在给定一个整数数组,将该数组按峰与谷的交替顺序排序。</p>\n\n<p><strong>示例:</strong></p>\n\n<pre><strong>输入: </strong>[5, 3, 1, 2, 3]\n<strong>输出:</strong> [5, 1, 3, 2, 3]\n</pre>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>nums.length <= 10000</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 42,
|
||||
"likes": 44,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -131,7 +131,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"9.6K\", \"totalSubmission\": \"14.5K\", \"totalAcceptedRaw\": 9601, \"totalSubmissionRaw\": 14516, \"acRate\": \"66.1%\"}",
|
||||
"stats": "{\"totalAccepted\": \"10K\", \"totalSubmission\": \"15.1K\", \"totalAcceptedRaw\": 10020, \"totalSubmissionRaw\": 15122, \"acRate\": \"66.3%\"}",
|
||||
"hints": [
|
||||
"假设数组按升序排序。有什么办法可以把它调整为交替的高峰和低谷?",
|
||||
"尝试遍历排序的数组。你可以交换元素直到将数组调整好吗?",
|
||||
|
Reference in New Issue
Block a user