S5 ICT: Algorithms and Flowcharts, estimation and tracing
- 2026-11-20
S5 ICT: Algorithms and Flowcharts, estimation and tracing
Work through binary search counts, sorting comparison counts and trace table sizes to sharpen estimation and debugging in DSE ICT algorithm questions.
Intermediate: counts and tracing Estimation drives this paper: binary search over 64 items takes at most six comparisons; linear search over 1 000 averages about 500; bubble sort on eight items needs 28 comparisons in the worst case; a trace table for summing 1 to 4 has five rows and a total of 10; halving 100 reaches 1 in six steps; selection sort on six items takes fifteen comparisons; searching 1 000 items for an absent value still costs at most ten; insertion sort on five items needs ten in the worst case; plus the fault of writing two steps in one trace row.
01 Paper details (check answers afterwards)
| Item | Detail |
|---|---|
| Questions | 10 |
| Suggested time | 25 |
| Difficulty mix | Foundation 3 · Intermediate 3 · Challenge 3 · Error redo 1 |
| Chapter | Chapter: S5 ICT: Algorithms and Flowcharts |
| Level | Intermediate (10 items) |
02 Questions (10 items)
- FoundationSearching 64 sorted items by binary search takes at most how many comparisons?
- FoundationA linear search over 1 000 items takes how many comparisons on average?
- FoundationBubble sort on eight items makes how many comparisons in total in the worst case?
- IntermediateWith `sum = 0` then `for i in range(1, 5): sum += i`, how many rows and what final sum?
- IntermediateHalving 100 (rounding down) until it reaches 1 takes how many iterations?
- IntermediateSelection sort on six items needs how many passes and how many comparisons?
- ChallengeSearching 1 000 items for a value that is absent takes how many binary search comparisons at worst?
- ChallengeInsertion sort on five items makes how many comparisons in the worst case?
- ChallengeA trace row says “i increases by 1 and sum increases by i” at once. What is wrong?
- Error redoA decision has only two exits. How do you classify into three groups?
03 Answers and one-line notes
| # | Answer | One-line note |
|---|---|---|
| 1 | At most six. | 2 to the power 6 equals 64, and each comparison halves the remaining range. |
| 2 | About 500. | The target sits around the middle on average, so roughly half the items are checked. |
| 3 | Twenty eight in total. | Eight items give 8 times 7 divided by 2, that is 28 pairs. |
| 4 | Five rows and a sum of 10. | Initialisation takes one row and the four iterations take four, giving 1+2+3+4 equals 10. |
| 5 | Six iterations. | The sequence is 100, 50, 25, 12, 6, 3, 1, which is six halvings. |
| 6 | Five passes and fifteen comparisons. | Each pass fixes one minimum, and the comparisons total 6 times 5 divided by 2, that is 15. |
| 7 | Ten. | Even when the value is absent, the range shrinks to nothing after ten halvings. |
| 8 | Ten in total. | Each item may be compared with all earlier ones, and 1+2+3+4 gives 10. |
| 9 | Two steps share one row, so the intermediate state is lost. | Assessment looks at variable values after each step, and mixing steps defeats the purpose of tracing. |
| 10 | Chain two decisions, ruling groups out one at a time. | Test for the first group, otherwise test for the second, and the remainder forms the third group. |
04 What to do after marking
- After marking, redo only the wrong items and write down which step went wrong (formula, unit, or misread number).
- Repeat the same item two days later; move to the next paper only when both attempts are correct.
- Parents only need the answer and note columns; there is no need to explain every item.
Want to draw the flowchart and fill the trace table yourself? Book a TutorZone tutor and unpack all ten items in 25 minutes.Tutor Registration →
Questions and answers are written originally by the TutorZone team and are not taken from any school, publisher or examination authority paper. Every value is checked by computer.



