Worked solution from the Computational thinking and Problem-solving Paper 3 Advanced Theory booklet, Part 2 of 2.
Description: recursion is beneficial for problems that can be broken down into smaller, repeated problems of the same kind. [1]
It is especially useful when the problem has many possible branches or is too complex to solve with a loop (iteration). [1]
Example: solving a mathematical series (such as factorial), or sorting a pile of documents. [1]
▶ Topic lesson
A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.