🌱 DSA (Beginner) · Next Level (Brief) · cozy lesson
Intervals
9 min · 1 min read · no scary math, promise
🤖
You’ve got this. Read a little, play a little — I’ll wait. No rush.
def merge(iv):
iv.sort()
out=[]
for s,e in iv:
if out and s<=out[-1][1]:
out[-1][1]=max(out[-1][1],e)
else: out.append([s,e])
return out
💛 Enjoying? Try 5 playful quizzes or watch it move.
Check your understanding
Correct answers earn XP (once each).
1. First step?
2. Overlap if…
My notes (saved in this browser)
Select text above → Save selection, or write your own. AlgoMaster-style notebook, local-first for MVP.
No notes yet. Your highlights will live here.
Finished reading? Seal it with a tick ✅
The checkbox in the explorer turns green too — same progress.