1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-25 06:48:57 +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>给你一个<strong> 无重叠的</strong><em> </em>按照区间起始端点排序的区间列表。</p>\n\n<p>在列表中插入一个新的区间,你需要确保列表中的区间仍然有序且不重叠(如果有必要的话,可以合并区间)。</p>\n\n<p> </p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>intervals = [[1,3],[6,9]], newInterval = [2,5]\n<strong>输出:</strong>[[1,5],[6,9]]\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]\n<strong>输出:</strong>[[1,2],[3,10],[12,16]]\n<strong>解释:</strong>这是因为新的区间 <code>[4,8]</code> 与 <code>[3,5],[6,7],[8,10]</code> 重叠。</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre>\n<strong>输入:</strong>intervals = [], newInterval = [5,7]\n<strong>输出:</strong>[[5,7]]\n</pre>\n\n<p><strong>示例 4</strong></p>\n\n<pre>\n<strong>输入:</strong>intervals = [[1,5]], newInterval = [2,3]\n<strong>输出:</strong>[[1,5]]\n</pre>\n\n<p><strong>示例 5</strong></p>\n\n<pre>\n<strong>输入:</strong>intervals = [[1,5]], newInterval = [2,7]\n<strong>输出:</strong>[[1,7]]\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>0 <= intervals.length <= 10<sup>4</sup></code></li>\n\t<li><code>intervals[i].length == 2</code></li>\n\t<li><code>0 <= intervals[i][0] <= intervals[i][1] <= 10<sup>5</sup></code></li>\n\t<li><code>intervals</code> 根据 <code>intervals[i][0]</code> 按 <strong>升序</strong> 排列</li>\n\t<li><code>newInterval.length == 2</code></li>\n\t<li><code>0 <= newInterval[0] <= newInterval[1] <= 10<sup>5</sup></code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 567,
"likes": 572,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Merge Intervals\", \"titleSlug\": \"merge-intervals\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5408\\u5e76\\u533a\\u95f4\"}, {\"title\": \"Range Module\", \"titleSlug\": \"range-module\", \"difficulty\": \"Hard\", \"translatedTitle\": \"Range \\u6a21\\u5757\"}]",
@@ -137,7 +137,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"103.4K\", \"totalSubmission\": \"249.6K\", \"totalAcceptedRaw\": 103404, \"totalSubmissionRaw\": 249621, \"acRate\": \"41.4%\"}",
"stats": "{\"totalAccepted\": \"106.9K\", \"totalSubmission\": \"257.9K\", \"totalAcceptedRaw\": 106930, \"totalSubmissionRaw\": 257941, \"acRate\": \"41.5%\"}",
"hints": [],
"solution": null,
"status": null,