Computer Science › Section F · Algorithms › Topic F.4
Iterative structures: sequential search and insertion sort
Most useful algorithms repeat something: check the next entry, move the next card, pour the next drop. This topic shows how loops are controlled so that they always finish, then uses them to build two classic algorithms, sequential search and insertion sort.
In this topic
- Why loops
- Loop control: initialise, test, modify
- Pretest and posttest loops
- For-each loops
- The sequential search algorithm
- Worked example: tracing a sequential search
- The idea of insertion sort
- Insertion sort in pseudocode
- Worked example: tracing insertion sort
- Common mistakes to avoid
- Key takeaways
This topic is part of Wuanberri Pro. Checking your access…
