mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 14:58:56 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>牌组中的每张卡牌都对应有一个唯一的整数。你可以按你想要的顺序对这套卡片进行排序。</p>\n\n<p>最初,这些卡牌在牌组里是正面朝下的(即,未显示状态)。</p>\n\n<p>现在,重复执行以下步骤,直到显示所有卡牌为止:</p>\n\n<ol>\n\t<li>从牌组顶部抽一张牌,显示它,然后将其从牌组中移出。</li>\n\t<li>如果牌组中仍有牌,则将下一张处于牌组顶部的牌放在牌组的底部。</li>\n\t<li>如果仍有未显示的牌,那么返回步骤 1。否则,停止行动。</li>\n</ol>\n\n<p>返回能以<strong>递增顺序</strong>显示卡牌的牌组顺序。</p>\n\n<p>答案中的第一张牌被认为处于牌堆顶部。</p>\n\n<p> </p>\n\n<p><strong>示例:</strong></p>\n\n<pre><strong>输入:</strong>[17,13,11,2,3,5,7]\n<strong>输出:</strong>[2,13,3,11,5,17,7]\n<strong>解释:\n</strong>我们得到的牌组顺序为 [17,13,11,2,3,5,7](这个顺序不重要),然后将其重新排序。\n重新排序后,牌组以 [2,13,3,11,5,17,7] 开始,其中 2 位于牌组的顶部。\n我们显示 2,然后将 13 移到底部。牌组现在是 [3,11,5,17,7,13]。\n我们显示 3,并将 11 移到底部。牌组现在是 [5,17,7,13,11]。\n我们显示 5,然后将 17 移到底部。牌组现在是 [7,13,11,17]。\n我们显示 7,并将 13 移到底部。牌组现在是 [11,17,13]。\n我们显示 11,然后将 17 移到底部。牌组现在是 [13,17]。\n我们展示 13,然后将 17 移到底部。牌组现在是 [17]。\n我们显示 17。\n由于所有卡片都是按递增顺序排列显示的,所以答案是正确的。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li><code>1 <= A.length <= 1000</code></li>\n\t<li><code>1 <= A[i] <= 10^6</code></li>\n\t<li>对于所有的 <code>i != j</code>,<code>A[i] != A[j]</code></li>\n</ol>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 161,
|
||||
"likes": 163,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"11.1K\", \"totalSubmission\": \"14.2K\", \"totalAcceptedRaw\": 11078, \"totalSubmissionRaw\": 14182, \"acRate\": \"78.1%\"}",
|
||||
"stats": "{\"totalAccepted\": \"11.3K\", \"totalSubmission\": \"14.5K\", \"totalAcceptedRaw\": 11286, \"totalSubmissionRaw\": 14460, \"acRate\": \"78.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
||||
Reference in New Issue
Block a user