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.

About 3 min6 interactive slides · 5 questionsLesson 407 · Zone 46

Play this lesson

Free to play in your browser or on iPhone

More in this zone

  1. 406PuzzlesThe Knight's TourCan a knight visit every square exactly once?
  2. 408Group TheoryRubik's Cube: 43 Quintillion PositionsEvery position can be solved in 20 moves or fewer
  3. 409Mobile NetworksThe Invisible HandoffYour phone changes towers mid-call without you noticing
  4. 410Digital ImagingDitheringHow old images faked colors they didn't have
  5. 411Game AIDeep Blue vs KasparovIn 1997 a computer beat the world chess champion
  6. 412Game AIMove 37AlphaGo played a move experts called a mistake, and it won
  7. 413Matching MarketsThe Matchmaking Algorithm That Won a NobelIt places doctors in hospitals and students in schools
  8. 414Additive ManufacturingThe 3D-Printed LatticeEmpty space can make a part lighter without making it weaker