Given an array of intervals, merge all overlapping intervals and return the result.
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]]
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
to save progress and use AI features