Algorithm Design and Problem Solving · 4 question types
Past paper frequency (2018 to 2024)
This topic accounts for approximately 7% of your exam marks.
Bubble sort traces and binary search descriptions appear in nearly every paper. 4 to 6 marks.
Searching and sorting are often combined in real programs:
| Situation | Strategy |
|---|---|
| One-off search in unsorted data | Linear search; sorting first would be wasted effort |
| Many searches in the same dataset | Sort once (e.g. bubble sort or a faster algorithm), then binary search every query |
| Constant additions, occasional searches | Stay with linear search, or maintain order as items arrive |
| Sorted data displayed to a user | Bubble sort or another sort first, then display |
A typical pattern: a school's student records are sorted by surname once when loaded, and every "find a student" query uses a binary search after that.