mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 08:21:41 +08:00
移除零宽空格
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"titleSlug": "remove-covered-intervals",
|
||||
"content": "<p>Given an array <code>intervals</code> where <code>intervals[i] = [l<sub>i</sub>, r<sub>i</sub>]</code> represent the interval <code>[l<sub>i</sub>, r<sub>i</sub>)</code>, remove all intervals that are covered by another interval in the list.</p>\n\n<p>The interval <code>[a, b)</code> is covered by the interval <code>[c, d)</code> if and only if <code>c <= a</code> and <code>b <= d</code>.</p>\n\n<p>Return <em>the number of remaining intervals</em>.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> intervals = [[1,4],[3,6],[2,8]]\n<strong>Output:</strong> 2\n<strong>Explanation:</strong> Interval [3,6] is covered by [2,8], therefore it is removed.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> intervals = [[1,4],[2,3]]\n<strong>Output:</strong> 1\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= intervals.length <= 1000</code></li>\n\t<li><code>intervals[i].length == 2</code></li>\n\t<li><code>0 <= l<sub>i</sub> < r<sub>i</sub> <= 10<sup>5</sup></code></li>\n\t<li>All the given intervals are <strong>unique</strong>.</li>\n</ul>\n",
|
||||
"translatedTitle": "删除被覆盖区间",
|
||||
"translatedContent": "<p>给你一个区间列表,请你删除列表中被其他区间所覆盖的区间。</p>\n\n<p>只有当 <code>c <= a</code> 且 <code>b <= d</code> 时,我们才认为区间 <code>[a,b)</code> 被区间 <code>[c,d)</code> 覆盖。</p>\n\n<p>在完成所有删除操作后,请你返回列表中剩余区间的数目。</p>\n\n<p> </p>\n\n<p><strong>示例:</strong></p>\n\n<pre>\n<strong>输入:</strong>intervals = [[1,4],[3,6],[2,8]]\n<strong>输出:</strong>2\n<strong>解释:</strong>区间 [3,6] 被区间 [2,8] 覆盖,所以它被删除了。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= intervals.length <= 1000</code></li>\n\t<li><code>0 <= intervals[i][0] < intervals[i][1] <= 10^5</code></li>\n\t<li>对于所有的 <code>i != j</code>:<code>intervals[i] != intervals[j]</code></li>\n</ul>\n",
|
||||
"translatedContent": "<p>给你一个区间列表,请你删除列表中被其他区间所覆盖的区间。</p>\n\n<p>只有当 <code>c <= a</code> 且 <code>b <= d</code> 时,我们才认为区间 <code>[a,b)</code> 被区间 <code>[c,d)</code> 覆盖。</p>\n\n<p>在完成所有删除操作后,请你返回列表中剩余区间的数目。</p>\n\n<p> </p>\n\n<p><strong>示例:</strong></p>\n\n<pre>\n<strong>输入:</strong>intervals = [[1,4],[3,6],[2,8]]\n<strong>输出:</strong>2\n<strong>解释:</strong>区间 [3,6] 被区间 [2,8] 覆盖,所以它被删除了。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= intervals.length <= 1000</code></li>\n\t<li><code>0 <= intervals[i][0] < intervals[i][1] <= 10^5</code></li>\n\t<li>对于所有的 <code>i != j</code>:<code>intervals[i] != intervals[j]</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 122,
|
||||
|
Reference in New Issue
Block a user