Merge Intervals

Medium

📝 Description

Merge all overlapping intervals

Input Format

List of intervals [start,end]

Output Format

Merged intervals

Constraints

1 ≤ intervals.length ≤ 10^4

🔍 Sample Input

[[1,3],[2,6],[8,10],[15,18]]
            

✅ Sample Output

[[1,6],[8,10],[15,18]]
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run