Computer Science › Section F · Algorithms › Topic F.5
Recursive structures: binary search
A loop repeats a task by going round again; recursion repeats it by handing a smaller copy of the task to itself. Binary search, which finds an entry in a sorted list of a million items in at most 20 looks, is the classic example.
In this topic
- Repetition as a subtask
- The idea of binary search
- Binary search in pseudocode
- Worked example: a successful search
- Worked example: a failed search
- Activations and base cases
- A simpler recursion and a broken one
- How fast is binary search?
- Recursion, loops and recursive sorts
- Common mistakes to avoid
- Key takeaways
This topic is part of Wuanberri Pro. Checking your access…
