/en-tutor-prep-s3-ict-algorithms-flowcharts/
/en-tutor-prep-s3-ict-algorithms-flowcharts/
英文版
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

S3 ICT | Algorithms and Flowcharts — Lesson-Prep Guide for Tutors | Five Tests, Six Symbols, Linear vs Binary Search

S3 ICT | Algorithms and Flowcharts — Lesson-Prep Guide for Tutors | Five Tests, Six Symbols, Linear vs Binary Search

  • 2026-11-11

Students can draw a flowchart but cannot say why binary search is faster. The gap is not drawing skill: it is refusing to turn “faster” into a count. This lesson divides 1,000 by two until one remains and keeps the number.

Objectives — Students can: (1) test a set of steps against input, output, definiteness, finiteness and effectiveness; (2) draw a flowchart with selection and iteration using the correct shapes; (3) work out that linear search needs at most 1,000 comparisons on 1,000 records while binary search needs 10, and explain that the gap comes from halving the range each time.

01 Prerequisites (3-minute check)

If any of these fails, fix it before the lesson starts.

Skill Quick check Pass mark
Powers of two What is 2 to the power 10? 1024, roughly one thousand
Halving How many times can you halve 1000 before it drops below 1? Ten times, because 1024 is just above 1000
Averages Where does linear search sit on average in 1000 items? Halfway, about 500 comparisons

02 Lesson flow (45 minutes)

Time Stage Tutor does Student does
0-5 min Two approaches Write “find a number between 1 and 1000”. Ask for one method, then for the fastest method. Most say “count from the start”; a few say “guess the middle”
5-13 min Five tests Check the counting method against each test; show finiteness breaking in an infinite loop. Can name the test that fails
13-24 min Symbols and three structures Draw the six symbols, then one example each of sequence, selection and iteration. Copy the symbol table and draw one example each
24-33 min Count comparisons Halve 1000 ten times on the board and compare with 1000 for linear search. Produce 10 and the 100-fold gap
33-40 min Four question types One flowchart debug, one comparison count, one design, one pseudocode-to-chart. Answer all four with steps
40-45 min Exit check Collect three answers and mark correct, half-correct or wrong on the spot. Hand in three answers

03 Teaching script (read it out)

Scene 1: Act 1: The five tests are a checkpoint, not a chant

“Input, output, definiteness, finiteness, effectiveness. You do not recite these, you run them. If you write ‘sort the data’, it fails definiteness, because no method and no comparison is specified. If you write ‘keep going until it is right’, it fails finiteness, because nothing guarantees it stops. Exams love these two failures: the steps look sensible but an exit is missing or a term is undefined. Check in order. Is there an input? Is there an output? Does every step have exactly one meaning? Will it stop? Can it be done in a finite number of steps?”

Undefined steps and endless loops are the two failures exams test most.

Scene 2: Act 2: Symbols are marks on the page

“Oval for start and stop, rectangle for process, diamond for decision, parallelogram for input and output, arrows on every flow line, connector for page breaks. Students usually lose marks not on logic but on putting a statement inside a diamond. A diamond must hold a yes-or-no question, such as ‘any records left to check’, with two labelled exits. An iteration needs one line going back above the test, otherwise it never ends. After drawing, trace with a finger: if you reach a box you can never leave, the exit is missing.”

A diamond holds a yes-or-no question with two labelled exits.

Scene 3: Act 3: Turn “faster” into a number

“On 1,000 records linear search compares at most 1,000 times, about 500 on average. Binary search halves the range: 1000, 500, 250, 125, 63, 32, 16, 8, 4, 2, 1, which is ten steps, because 2 to the power 10 is 1024. Divide 1000 by 10 and you get 100, so the worst case uses 99 fewer comparisons. Write ’10 comparisons, because each step halves the range and 2^10 exceeds 1000′. Writing ‘binary is much faster’ earns nothing. Add the condition too: the data must be sorted, or the halving has no basis.”

Each step halves the range; 2^10 exceeds 1000, so ten comparisons at most.

04 Question types and worked steps

Type Example Steps Answer
Flowchart debugging A loop has no line back to its decision. Find and fix it. (1) Locate every diamond (2) Check each has two exits (3) Check the loop returns (4) Draw the missing line Add a flow line from the end of the loop body back above the diamond, and confirm the condition eventually becomes false
Comparison count Sorted 1,000 records: what is the worst case for binary search, for linear search, and the ratio? (1) Write the halving sequence (2) Count steps to 1 (3) Verify with a power of two (4) Divide Binary 10 (2^10 = 1024); linear 1000; ratio 100
Algorithm design Write the steps to find the largest of three numbers and draw the flowchart. (1) Take three inputs (2) Assume the first is largest (3) Compare and update (4) Output the largest max = a; if b > max then max = b; if c > max then max = c; output max
Pseudocode to flowchart Convert total = 0; for i = 1 to 10; total = total + i into a flowchart. (1) Start and stop ovals (2) Initialise box (3) Diamond testing i > 10 (4) Body adds and increments (5) Output box Initialise, diamond (i > 10?), add box, i = i + 1, return line, then output total
Sanity check (teach this): Sanity check: 2^10 is 1024, not 1000; halving 1000 ten times reaches 1, so ten comparisons, not a hundred; linear worst case is 1000, not 10; 1000 divided by 10 is 100, not 10. No comparison count should exceed the number of records for linear search or fall below one for binary search; outside that range a formula or a unit is wrong.

05 Independent practice (3 questions)

Question Answer What to watch
Sorted 4,096 records: worst case for binary search? 12 comparisons, since 2^12 = 4096 Verified with a power of two rather than counting
Draw “keep adding one until the total exceeds 100” and mark the decision. Diamond “total > 100?”, yes to output, no back to the add step Both exits labelled
Why can binary search not be used on unsorted data? You cannot tell which half holds the target, so halving has no basis Explains the basis for halving

06 Common mistakes and what to say

Mistake Student writes Say this
Statement inside a diamond “The diamond says: check the data.” “A diamond must answer yes or no. Change it to ‘any records left to check’ and label both exits; then the question can be walked.”
Thinking binary search removes one item at a time “Binary search takes 1000 comparisons.” “Binary search halves the range: 1000, 500, 250, and so on, ten steps to 1. Writing 1000 treats it as linear.”
Loop with no return line “After the add box the flow goes straight to output.” “The add runs once and stops, so that is not a loop. Draw a line from the add back to the test and increment the counter each pass.”
Claiming speed without the precondition “Binary search is always faster.” “Add that the data must be sorted. Binary search on unsorted data gives a wrong answer, and that sentence carries the mark.”

07 Homework (paper, section and question numbers)

08 Exit check (last 5 minutes)

Question Answer Decision
Sorted 1,000 records: worst case for binary search? 10 comparisons (2^10 = 1024) Wrong: reteach Act 3 next lesson
Which shape is a decision and what goes inside? A diamond holding a yes-or-no question Wrong: reteach Act 2
Which two of the five tests fail most often? Definiteness and finiteness Wrong: reteach Act 1

09 Tutor FAQ

Do students need all six symbols?

They must recognise and use them, especially the diamond and the parallelogram; exam questions usually give a diagram to fix.

Why use powers of two instead of counting?

A power states why the answer is that number and is the foundation for complexity later.

Teach the flowchart and the pseudocode together?

Yes. Converting one to the other in both directions shows they are the same algorithm in two notations.

Find a tutor — freeTutor Registration →

A TutorZone lesson-prep guide. Written by the TutorZone team; questions and lesson flow are original and are not taken from any school or publisher material.

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