1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-02 22:13:28 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>给定一个整数数组,编写一个函数,找出索引<code>m</code>和<code>n</code>,只要将索引区间<code>[m,n]</code>的元素排好序,整个数组就是有序的。注意:<code>n-m</code>尽量最小,也就是说,找出符合条件的最短序列。函数返回值为<code>[m,n]</code>,若不存在这样的<code>m</code>和<code>n</code>(例如整个数组是有序的),请返回<code>[-1,-1]</code>。</p>\n<p><strong>示例:</strong></p>\n<pre><strong>输入:</strong> [1,2,4,7,10,11,7,12,6,7,16,18,19]\n<strong>输出:</strong> [3,9]\n</pre>\n<p><strong>提示:</strong></p>\n<ul>\n<li><code>0 <= len(array) <= 1000000</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 88,
"likes": 95,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -167,7 +167,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"18.2K\", \"totalSubmission\": \"39.7K\", \"totalAcceptedRaw\": 18181, \"totalSubmissionRaw\": 39699, \"acRate\": \"45.8%\"}",
"stats": "{\"totalAccepted\": \"18.8K\", \"totalSubmission\": \"40.9K\", \"totalAcceptedRaw\": 18790, \"totalSubmissionRaw\": 40900, \"acRate\": \"45.9%\"}",
"hints": [
"在开始和结束时知道最长的排序序列会有帮助吗?",
"我们可以把这个数组分成3个子数组LEFT、MIDDLE和RIGHT。LEFT和RIGHT都是有序的。MIDDLE的元素顺序是任意的。我们需要展开MIDDLE直到可以对这些元素排序并使整个数组有序。",