Skip to content
PlayOwl

Coding · Grade 11

Recursion and Problem Decomposition

Learners build recursive solutions from base cases and smaller subproblems, tracing them with the call stack and indented call logs. They design recursive functions for palindromes, powers by halving, digit sums and lists, test them against hidden buggy versions, analyse costs with call trees (including Fibonacci's exponential blow-up and memoisation), and decide when iteration is the better choice.

  • 4 lessons
  • About 100 minutes
  • Check what you learned: 8 questions
  • Ways to answer: choose an answer, put code in order, trace code, type a number, sort into groups and write tests
Try it now (no account) One of the five free starter courses Open in PlayOwl

What learners will discover

  • Identify base and recursive cases and trace recursive calls using the call stack.
  • Design recursive solutions by decomposing problems into smaller instances of themselves.
  • Analyse recursive algorithms with call trees, including exponential blow-up and memoisation.
  • Choose between recursion and iteration based on problem shape, efficiency and depth limits.

Lessons

  1. Base cases and the call stack 6 steps3 practiceabout 22 min
  2. Thinking recursively 5 steps3 practiceabout 24 min
  3. The cost of recursion 5 steps3 practiceabout 22 min
  4. Recursion or iteration? 4 steps3 practiceabout 18 min
  5. Check what you learned 8 questions at the end

Keep exploring

More 11th grade coding

Guide for grown-ups