Inside the ComputerProgramming Concepts
The Recursion Mirror
A problem can be solved by a smaller copy of itself
A camera pointed at its own screen shows a screen inside a screen inside a screen. Can that trick solve a puzzle?
You'll find out
- What happens when code calls itself?
- How do L‑shapes cover a chessboard?
- Why don't the copies go on forever?
Why it matters
Recursion breaks a big problem into smaller copies of itself. Programs use it to walk folders and draw fractals.
Play this lesson
Free to play in your browser or on iPhone