/en-tutor-prep-s3-term1-ict-algorithms/
/en-tutor-prep-s3-term1-ict-algorithms/
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 Term 1 | ICT: Algorithms – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers

S3 Term 1 | ICT: Algorithms – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers

  • 2026-11-30

Lesson prep guide · S3 Term 1 ICT

Students can write a search that checks every item but cannot say why a binary search is faster, nor what an algorithm must satisfy. This lesson sets the same job two ways: find 16 among five numbers, then find one item among a thousand, separating “it works” from “it works fast”.

Lesson objectives Students can (1) state the four conditions of an algorithm (inputs and outputs, definite steps, finite, terminating); (2) compare the comparison counts of linear and binary search; (3) trace variables step by step and give the value at each step.

01 Prior knowledge check (first 3 minutes)

If any item below fails, fix it first, or this lesson stalls:

Skill Quick check Pass standard
Order of operations What is 3 plus 4 times 2 11
Powers What is 2 to the power 10 1024
Halving How many halvings take 1000 below 1 About ten

02 Lesson flow (45 minutes)

Time Stage Tutor does Student does
0–5 min Opening: find 16 Write [4, 8, 15, 16, 23] and ask how many comparisons are needed Most say four, some say the fourth item
5–15 min Four conditions Use making tea and looking up a number to check each condition Decide whether a set of steps is an algorithm and say why
15–25 min Linear against binary Model 1000 comparisons against about 10, a hundredfold gap Compute the binary count for 500 items
25–34 min Tracing Model x going 3 to 7 to 14, and sum climbing to 55 Trace a swap and give the final values
34–41 min Why efficiency matters Compare 1000 items with a million, so growth matters more than one gap Estimate the binary count for a million items
41–45 min Exit check Collect three answers and note definition errors against trace errors Work without notes

03 Teaching script (read it aloud)

Act one: an algorithm is not “roughly like this”

An algorithm is an ordered set of definite steps that can be followed exactly, and it satisfies four conditions: it has inputs and outputs, every step is unambiguous, the number of steps is finite, and it always stops. “Tidy the data up” is not an algorithm, because tidying has too many readings, while “compare each item in turn, stop when found, and report absent after the last comparison” is one, because every step is executable and it always terminates.

Most common misconception: treating code as the algorithm. The algorithm is the method itself, and the same method can be written in Python, as a flowchart or in pseudocode.

Students restate: inputs and outputs, definite steps, finite and terminating, all four before it counts.

Act two: 1000 comparisons against 10

Searching 1000 sorted items one by one takes up to 1000 comparisons in the worst case. A binary search looks at the middle, discards half after each comparison, and 1000 halves to 500, 250, 125, 62, 31, 16, 8, 4, 2 and 1, which is ten steps, because 2 to the power 10 is 1024. The worst case therefore falls from 1000 to 10, a hundredfold saving. In [4, 8, 15, 16, 23] a linear search finds 16 on the fourth comparison and needs all five to prove 99 is absent, which is what worst case means.

Second misconception: binary search is always faster. It needs sorted data, and sorting unsorted data costs work of its own.

Students restate: binary search halves the range, so ten steps cover a thousand, provided the data is sorted.

Act three: tracing writes every step down

The rule for tracing is that every assignment overwrites the old value and the right side is evaluated first. So x = 3, then x = x + 4 gives 7, then x = x times 2 gives 14. Swapping two variables always needs a temporary: with a = 2 and b = 5, t = a stores 2, a = b makes a 5, and b = t makes b 2, so a ends at 5 and b at 2. Without the temporary both become 5. Accumulating follows the same rule: sum starts at 0, i runs from 1 to 10, and sum ends at 55.

Students restate: the right side is evaluated before the left is written, and a swap always borrows a third variable.

04 Question types and steps

Type Example Steps Answer
Definition Is “tidy the data up” an algorithm Too many readings, no definite steps No; the steps must be executable
Linear search Find 99 among five items Compare each in turn and all fail 5 comparisons to conclude absent
Binary search Worst case for 1000 items Halve each time; 2 to the power 10 is 1024 About 10
Tracing x = 3; x = x + 4; x = x times 2 Right side first 14
Algorithms: one task, two searches, a hundredfold gap on 1000 itemsInputfive sorted numbersProcesscompare the middle each timeOutputfound or not foundLinear worst case1000 comparisonsLinear10 comparisonsBinary1000 sorted itemsStep tracex = 3x = 3 + 4 = 7x = 7 x 2 = 14find 16: 4th comparisonfind 99: 5 comparisons, absentFirst ask whether the steps stop, then ask how many comparisons they cost.

An algorithm is a finite, ordered, definite set of steps that always stops. Searching 1000 sorted items takes up to 1000 comparisons with a linear search, while a binary search halves the range each time; since 2 to the power 10 is 1024, it needs about 10 comparisons, a hundredfold saving. In [4, 8, 15, 16, 23] a linear search finds 16 on the fourth comparison and needs all five to prove 99 is absent. Running x = 3, then x = x + 4, then x = x times 2 leaves 14.

Sanity check (must teach):Comparison counts check by powers: 1000 items take ten binary steps because 2 to the power 10 is 1024, and 500 items take nine because 2 to the power 9 is 512. The gap is a division: 1000 over 10 is 100, so it is a hundredfold, not tenfold. A linear search costs exactly the number of items in the worst case, since a miss requires checking everything, which is why finding 99 among five costs five. Traces must be written step by step: 3 plus 4 is 7 and 7 times 2 is 14, while 3 plus 8 equal to 11 comes from merging the steps and applying the wrong precedence. The running total checks by formula n(n+1)/2: 10 times 11 over 2 is 55.

05 Three independent practice questions

Question Answer What to observe
Search [4, 8, 15, 16, 23] linearly for 16 and for 99: how many comparisons each? Four for 16 and five for 99 Whether a miss still counts; zero means the scan was skipped
A binary search over 1000 sorted items: worst case about how many? And 500 items? About ten for 1000 and nine for 500 Whether powers were used; 500 means a linear search
x = 3; x = x + 4; x = x times 2: what is x? 14 11 means multiplication came first

06 Common errors and correction lines

Error Student usually writes Tutor says
Code mistaken for algorithm “An algorithm is a Python program” “The algorithm is the method; it can be written as code, a flowchart or pseudocode.”
Binary assumed always faster “Binary search is faster in every case” “It needs sorted data, and sorting what is unsorted costs work of its own.”
Misses not counted “Finding 99 takes no comparisons because it is not there” “All five must be compared to prove absence, so the worst case is five.”
Swap without a temporary “a = b; b = a swaps them” “The first line already overwrites a, so a temporary must hold a first.”

07 Homework (paper and question numbers)

08 Exit check (last 3 minutes)

Question Answer Verdict
What are the four conditions of an algorithm? Inputs and outputs, definite steps, finite, terminating “It has steps” alone is not enough; reteach act one
Worst case for a binary search over 1000 items? About ten 1000 means a linear search; reteach act two
a = 2 and b = 5 after a swap: what are a and b? a is 5 and b is 2 Both at 5 means the temporary was omitted; reteach act three

09 Tutor FAQ

Which year is this page for?

S3 Term 1, the introduction to algorithms and searching in local secondary ICT; S4 extends it to sorting and complexity.

Is 45 minutes enough for the definition and efficiency?

Yes. Ten minutes on the definition, ten on the two searches and nine on tracing, with the rest for estimates and the exit check.

Is there a matching worksheet?

Yes. The homework links to questions 7 and 9 of set 1 and question 8 of set 2 of the S3 algorithms and flowcharts paper, all with answers.

Find a tutor freeTutor sign-up →

©2026 TutorZone · www.tutorzone.com.hk · Terms of use · All rights reserved. Original TutorZone material for personal study and teaching only; not for resale or republication.

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