0PricingLogin
Competitive Programming Academy · Lesson

Think Recursively: Base & Recurse

Break a problem into smaller copies.

What Recursion Means

Recursion is a function that solves a problem by calling itself on a smaller piece, until the piece is tiny enough to answer directly. 🌀

Trust the Smaller Copy

The key mindset is the leap of faith: assume the recursive call already works on the smaller input, then build your answer on top of it.

All lessons in this course

  1. Think Recursively: Base & Recurse
  2. Generate All Subsets
  3. Permutations and the N-Queens Idea
  4. Prune to Survive the Time Limit
← Back to Competitive Programming Academy