
Once students understand base and general cases, the next step is using recursion on real algorithms. This lesson rebuilds binary search recursively, with Lower and Upper passed as parameters, then applies the same thinking to adding up a list and reversing a string.
There’s a full trace of a search that fails, a spot-the-bug on the missing return that costs marks every year, and a side-by-side conversion from recursion to iteration.
What’s included
- 16-slide editable teacher PowerPoint, with speaker notes on every slide
- Python starter code with guided TODOs and the full tested solution, in a Word file ready to copy into your editor (including a recursive palindrome checker extension)
- Student worksheet (33 marks) in Word and PDF: tracing a recursive binary search, fill-the-gap code, spot-the-errors and exam-style questions
- Full answer key in Word and PDF
How the lesson runs
- A starter on why binary search suits recursion
- The recursive binary search, with base and general cases
- Key vocabulary: recursive call, parameters, slicing and stack overflow
- BinarySearch, SumList, Reverse and the iterative version
- A spot-the-bug slide on the missing return
- A trace mini task with answers, and a worked trace of a failed search
- A coding task, exam-style question with mark scheme, and exit ticket
Written for Cambridge International AS & A Level Computer Science (9618), Paper 4 Practical, and pitched at A Level (Year 13). Everything is editable, so you can adapt it for your own classes.
Please leave a review if you find it useful. It really helps!
Something went wrong, please try again later.
This resource hasn't been reviewed yet
To ensure quality for our reviews, only customers who have purchased this resource can review it
Report this resourceto let us know if it violates our terms and conditions.
Our customer service team will review your report and will be in touch.