/en-tutor-prep-s3-term2-ict-arrays/
/en-tutor-prep-s3-term2-ict-arrays/
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 2 | ICT: Arrays – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers

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

  • 2026-11-30

Lesson prep guide · S3 Term 2 ICT

First-time array users trip on three things: assuming index 1, dropping the last element in a loop, and one comparison short when a value is absent. Five numbers settle indexing, traversal and search.

Lesson objectives Students can (1) read and write elements with 0-based indices; (2) traverse an array to sum or find the maximum; (3) compare linear and binary search and state the precondition for binary.

01 Prior knowledge check (first 3 minutes)

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

Skill Quick check Pass standard
Ordering The last index of a five-element array Four, since indexing starts at 0
Loops How many passes to visit five elements Five
Indices What 2 to the tenth is 1024

02 Lesson flow (45 minutes)

Time Stage Tutor does Student does
0–5 min Opening: five lockers Label lockers 0 to 4 and ask the number of the third Say index 2
5–14 min Index and length Index from 0, length is the count, last index is length minus one Write a read expression
14–23 min Traversal Loop 0 to 4 summing to 66 and finding 23 Trace one themselves
23–32 min Linear search Model four comparisons for 16 and five for a missing 99 Compute comparison counts
32–40 min Binary search Model about ten for 1000 sorted items and its precondition State the precondition and count
40–45 min Exit check Collect three answers and sort index, traversal and search errors Work without notes

03 Teaching script (read it aloud)

Act one: indexing starts at zero

An array is a row of numbered slots, and the number is the index, starting at 0. A five-element array has indices 0, 1, 2, 3 and 4, a length of 5 and a last index of length minus one, which is 4. So the third element is array[2], not array[3], and students who read third as 3 fetch the fourth. Store the length in a variable rather than hard-coding numbers.

Most common misconception: that indexing starts at 1. Most languages start at 0, so the last index is length minus one, and off-by-one errors raise an out-of-range fault.

Students restate: index from 0, and the last index is length minus one.

Act two: one traversal, one repeated job

Traversal visits every element in turn, which a loop handles. To sum, set sum to 0 and loop the index from 0 to 4, adding each element, so 4 plus 8 plus 15 plus 16 plus 23 is 66. To find the maximum, set max to the first element and compare each, updating on a larger value, ending at 23. The usual slip is the bound: writing less than 4 drops the last element and the sum falls to 43, while less than or equal to 5 runs past the end. The bound is 0 to length minus one.

Second misconception: that traversing n elements needs n plus one passes. Zero to four is exactly five.

Students restate: loop from 0 to length minus one, giving a sum of 66 and a maximum of 23.

Act three: two searches, two costs

There are two ways to find a value. Linear search compares from the start, so finding 16 means comparing 4, 8, 15 and 16, which is four comparisons, while a missing 99 needs all five before absence is certain. Binary search needs sorted data and compares the middle each time, halving the range, so 1000 items need about ten comparisons because 2 to the tenth is 1024. Binary is far faster but only after sorting, and sorting has its own cost. Answers must give the precondition and the count.

Third misconception: that binary search works on any array. Unsorted data makes a middle comparison meaningless.

Students restate: linear compares in turn, binary needs sorting first, and 1000 items take about ten.

04 Question types and steps

Type Example Steps Answer
Index The index of the third element Count from 0 2
Traversal Sum five elements Add indices 0 to 4 66
Search Comparisons to find 16 Compare through index 3 Four
Binary 1000 sorted items 2 to the tenth About ten
Arrays start at index 0: finding 16 takes four comparisons, a missing 99 takes five4index 08index 115index 216index 3found23index 4length 5, indices 0 to 4linear: 4 comparisons99: five and still absentbinary: 1000 items, about 102 to the 10 is 1024

Every array element has an index starting at 0: the first is index 0, the last index 4, and the length is 5. Linear search compares from the start, so finding 16 takes four comparisons, indices 0 to 3, while a missing 99 needs all five before you can say it is absent. Given 1000 sorted items, binary search takes about ten comparisons because 2 to the 10 is 1024, which is why sorting first pays.

Sanity check (must teach):Index and length agree: length 5 means indices 0 to 4, with the last equal to length minus one. The traversal checks by addition, 4 plus 8 plus 15 plus 16 plus 23 is 66 with a maximum of 23. Comparison counts make sense, four to reach index 3 and five when absent. The binary count checks by powers, since 2 to the ninth is 512, too few, and 2 to the tenth is 1024, enough, so about ten.

05 Three independent practice questions

Question Answer What to observe
What is the last index of a five-element array? Four, since indexing starts at 0 Five is out of range
What is the sum of [4, 8, 15, 16, 23]? 4 plus 8 plus 15 plus 16 plus 23, which is 66 65 skips one element
How many comparisons for a binary search over 1000 sorted items? About ten, since 2 to the tenth is 1024 500 means linear search was used

06 Common errors and correction lines

Error Student usually writes Tutor says
Index from one “The third element is array[3]” “Indexing starts at 0, so the third is array[2]; array[3] is the fourth.”
Last element dropped “The loop runs to less than 4, so four elements” “Length 5 needs 0 to 4; stopping at 4 misses 23 and the sum falls to 43.”
Absence treated as a bug “If it is not found the program is wrong” “Absence is a normal result, and linear search must compare everything to prove it.”
Binary without sorting “Any array supports binary search” “Binary needs sorted data, or the middle comparison means nothing.”

07 Homework (paper and question numbers)

08 Exit check (last 3 minutes)

Question Answer Verdict
What is the index range of a five-element array? Zero to four, the last being length minus one One to five means one-based indexing; reteach act one
What is the sum of [4,8,15,16,23]? 66 43 means the last element was dropped; reteach act two
What precondition does binary search need? Sorted data “No precondition” misses the basis; reteach act three

09 Tutor FAQ

Which year is this page for?

S3 Term 2, the arrays unit in local secondary ICT; later years add two-dimensional arrays and sorting algorithms.

Is 45 minutes enough for indices and search?

Yes. Nine minutes on indices, nine on traversal, nine on linear search and eight on binary, with the rest for practice and the exit check.

Is there a matching worksheet?

Yes. The homework links to question 9 of set 1 and questions 6 and 8 of set 2 of the S3 ICT algorithms 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 →