Ready-to-use computing activity
Predict the Next Step
Teacher overview
Prior knowledge: Learners should be able to follow a short algorithm trace.
Learning objective: Predict the next comparison, movement or swap in common searching and sorting algorithms.
Starter
Show [5, 2, 4, 1]. Bubble sort has compared 5 and 2. What happens next?
Main task
- Predict the next comparison in linear search.
- Predict the next midpoint in binary search.
- Identify the next swap in bubble sort.
- Complete one missing movement in insertion sort.
- Correct a broken trace and explain the error.
Support prompts
- Use the highlighted index before deciding.
- Binary search discards half the sorted list.
- Insertion sort moves values to make space for the current item.
Challenge
Write a three-step trace for merge sort splitting and merging four values.
Plenary or exit question
What information do you need before predicting a valid next step?
