Exercises/#10 Merge Intervals
#10

Merge Intervals

MediumπŸ“¦ Arrays
90 XP

Problem

Given an array of intervals, merge all overlapping intervals and return the result.

Examples

Input: intervals = [[1,3],[2,6],[8,10],[15,18]]
Output: [[1,6],[8,10],[15,18]]

Input: intervals = [[1,4],[4,5]]
Output: [[1,5]]
sortingarrayintervals
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

10 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features