🌱 DSA (Beginner) · Warmup (Code Confidence) · cozy lesson
Recursion Intuition
10 min · 1 min read · no scary math, promise
🤖
You’ve got this. Read a little, play a little — I’ll wait. No rush.
def fact(n):
if n <= 1: return 1 # base
return n * fact(n-1) # leap of faith
def fib(n):
if n <= 1: return n
return fib(n-1) + fib(n-2)
Think: “If child returns right, can I finish?” Draw 1 level, trust rest. Next: memoize fib to O(n).
💛 Enjoying? Try 5 playful quizzes or watch it move.
Check your understanding
Correct answers earn XP (once each).
1. Recursion needs…
2. Stack overflow from?
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.