Skip to content

Commit 01290cc

Browse files
committed
Create README - LeetHub
1 parent f9aa3ce commit 01290cc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

0056-merge-intervals/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<h2><a href="https://leetcode.com/problems/merge-intervals">56. Merge Intervals</a></h2><h3>Medium</h3><hr><p>Given an array&nbsp;of <code>intervals</code>&nbsp;where <code>intervals[i] = [start<sub>i</sub>, end<sub>i</sub>]</code>, merge all overlapping intervals, and return <em>an array of the non-overlapping intervals that cover all the intervals in the input</em>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
6+
<pre>
7+
<strong>Input:</strong> intervals = [[1,3],[2,6],[8,10],[15,18]]
8+
<strong>Output:</strong> [[1,6],[8,10],[15,18]]
9+
<strong>Explanation:</strong> Since intervals [1,3] and [2,6] overlap, merge them into [1,6].
10+
</pre>
11+
12+
<p><strong class="example">Example 2:</strong></p>
13+
14+
<pre>
15+
<strong>Input:</strong> intervals = [[1,4],[4,5]]
16+
<strong>Output:</strong> [[1,5]]
17+
<strong>Explanation:</strong> Intervals [1,4] and [4,5] are considered overlapping.
18+
</pre>
19+
20+
<p>&nbsp;</p>
21+
<p><strong>Constraints:</strong></p>
22+
23+
<ul>
24+
<li><code>1 &lt;= intervals.length &lt;= 10<sup>4</sup></code></li>
25+
<li><code>intervals[i].length == 2</code></li>
26+
<li><code>0 &lt;= start<sub>i</sub> &lt;= end<sub>i</sub> &lt;= 10<sup>4</sup></code></li>
27+
</ul>

0 commit comments

Comments
 (0)