/en-tutor-prep-s5-ict-algorithms-flowchart-practice-3/
/en-tutor-prep-s5-ict-algorithms-flowchart-practice-3/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

S5 ICT: Algorithms and Flowcharts, challenge

S5 ICT: Algorithms and Flowcharts, challenge

  • 2026-11-20

S5 ICT: Algorithms and Flowcharts, challenge

Handle large scale binary search, merge sort comparison counts, nested loops and path counts in the harder estimation questions of DSE ICT.

Challenge: efficiency and paths This paper targets advanced estimation: binary search over 4 096 items takes 12 comparisons; merge sort on eight items costs at most 24; one million items need 20 comparisons since 2 to the power 20 is 1 048 576; a five by four nested loop runs its innermost statement 20 times; three decisions give eight paths; bubble sort on ten items makes 45 comparisons; adding 7 until 50 takes eight iterations; tracing 1 to 100 needs 101 rows and totals 5 050; binary search saves 1 014 comparisons over linear search on 1 024 items.

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 Challenge (10 items)

02 Questions (10 items)

  1. FoundationBinary search over 4 096 items takes at most how many comparisons?
  2. FoundationMerge sort on eight items makes at most how many comparisons?
  3. FoundationBinary search over one million items takes at most how many comparisons?
  4. IntermediateIn a nested loop with an outer count of five and an inner count of four, how often does the innermost statement run?
  5. IntermediateThree consecutive two-way decisions produce at most how many execution paths?
  6. IntermediateBubble sort on ten items makes how many comparisons in total in the worst case?
  7. ChallengeWith `k = 0` then adding 7 to k each round until k is no longer below 50, how many times does the loop run?
  8. ChallengeTracing a loop that adds 1 to 100 gives how many rows and what total?
  9. ChallengeHow many comparisons does binary search save over linear search on 1 024 items in the worst case?
  10. Error redoError check: someone says decision exits need no labels. Is that right?

03 Answers and one-line notes

# Answer One-line note
1 At most twelve. 2 to the power 12 equals 4 096, which exactly covers all the items.
2 At most twenty four. There are three levels since log base 2 of 8 is 3, and each level costs at most 8 comparisons.
3 At most twenty. 2 to the power 20 is 1 048 576, which already exceeds one million.
4 It runs twenty times. The inner count multiplies the outer count, so 5 times 4 gives 20.
5 At most eight. Each decision doubles the paths, and 2 to the power 3 gives 8.
6 Forty five in total. 10 times 9 divided by 2 gives 45, the number of item pairs.
7 Eight times. k takes the values 7, 14, 21, 28, 35, 42, 49 and 56, leaving the loop after the eighth.
8 One hundred and one rows, with a total of 5 050. One initialisation row plus one hundred iterations, and the total is 100 times 101 divided by 2.
9 It saves 1 014 comparisons. Linear search needs up to 1 024 while binary search needs at most 10, a difference of 1 014.
10 No, each exit must carry its condition. Without labels a reader cannot tell when each branch would be taken.

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.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →