🌱 DSA (Beginner) · Core Patterns · cozy lesson
Sorting Basics
10 min · 1 min read · no scary math, promise
🤖
You’ve got this. Read a little, play a little — I’ll wait. No rush.
nums = [5, 2, 9, 1]
nums.sort() # in place, Timsort O(n log n)
intervals = sorted(intervals) # then linear merge
Rule: if order unlocks two pointers/merge/greedy, pay the sort.
💛 Enjoying? Try 5 playful quizzes or watch it move.
Check your understanding
Correct answers earn XP (once each).
1. Sort first when…
2. Python sort cost?
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.