/en-tutor-prep-s3-term2-ict-data-structures/
/en-tutor-prep-s3-term2-ict-data-structures/
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: Data Structures – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers

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

  • 2026-11-30

Lesson prep guide · S3 Term 2 ICT

Students can write append and pop yet cannot say why a stack and a queue give opposite orders, or tell positional access from lookup by name. One set of numbers, 12, 8 and 15, contrasts all four structures.

Lesson objectives Students can (1) read and write list elements by index and compute length and total; (2) state last-in-first-out for a stack and first-in-first-out for a queue, and give the output order for the same data; (3) choose a structure for a task and explain that a dictionary finds a value by key in one 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
Indices Last index of a four-element list Three
Accumulation What 12 plus 8 plus 15 is 35
Order words Is first in first out a queue or a pile A queue

02 Lesson flow (45 minutes)

Time Stage Tutor does Student does
0–5 min Opening: lockers and plates Ask how the last item put down is taken first Say last in, first out
5–14 min Lists and indices Cover indices 0 to 3, length 4 and a total of 55 Read and write one element
14–23 min Stack, LIFO Push 12, 8 and 15, then pop in the order 15, 8, 12 Write the pop order
23–32 min Queue, FIFO Add 12, 8 and 15, then take 12, 8, 15 Contrast the two orders
32–40 min Dictionary lookup Keys A, B, C hold 90, 75, 60 and B takes one step Look up one key
40–45 min Exit check Collect three answers and sort index, order and choice errors Work without notes

03 Teaching script (read it aloud)

Act one: a list is a row of numbered slots

A list keeps elements in order, each with an index that starts at 0. For [12, 8, 15, 20] the indices are 0, 1, 2 and 3, the length is 4 and the last index is length minus one, so the third element is index 2, which holds 15. Appending adds at the end and turns four elements into five, and a total needs a loop, with 12 plus 8 plus 15 plus 20 giving 55. Before answering any list question, settle whether it asks for the third item or index 3, since those differ by one.

Most common misconception: that indexing starts at 1. Index 3 is the last slot, not the third; the third slot is index 2.

Students restate: indexing starts at 0 and the last index is length minus one.

Act two: stack and queue, one set of numbers, two orders

A stack is a pile of plates where you add and remove only at the top, so it is last in, first out. Push 12, 8 and 15 and the top holds 15, so the first pop is 15, then 8, then 12. A queue is a line where you join at the rear and leave at the front, so it is first in, first out. Add 12, 8 and 15 and the first out is 12, then 8, then 15. The same data therefore leaves a stack as 15, 8, 12 and a queue as 12, 8, 15, exactly reversed. Name the operations, push and pop against enqueue and dequeue, and the rule is already in the name.

Second misconception: that stack and queue differ in name only. Their output orders are opposite, so a print job sent through a stack comes out backwards.

Students restate: a stack gives 15, 8, 12 and a queue gives 12, 8, 15.

Act three: a dictionary looks up by key

A dictionary does not fetch by position but by name. With keys A, B and C holding 90, 75 and 60, writing dictionary[B] returns 75 in one step. Stored in a list instead, the same lookup means comparing items one by one, and proving a value absent takes all three comparisons. So the first question when choosing a structure is whether the task needs position, order or name: a dictionary for names, a stack for last in first out, a queue for waiting, and a list for ordered read and write. State the reason, not only the answer.

Third misconception: that dictionary keys must be numbers. Keys can be text, such as a student name, and the only requirement is that each key is unique.

Students restate: a dictionary finds a value by its unique key in one step.

04 Question types and steps

Type Example Steps Answer
List index Third element of [12, 8, 15, 20] Indices start at 0, so index 2 15
List total Add every element of [12, 8, 15, 20] Accumulate one at a time 55
Stack output Pop order after pushing 12, 8, 15 Last in, first out 15, 8, 12
Queue output Order out after adding 12, 8, 15 First in, first out 12, 8, 15
Four data structures: list, stack, queue and dictionaryList: indexed and editable12081152203Indices 0 to 3, total 55Stack: last in, first out (LIFO)15812toppush 15popPush 12, 8, 15; pop 15 firstQueue: first in, first out (FIFO)12815front (out)rear (in)Add 12, 8, 15; take 12 firstDictionary: look up by key‘A’→90‘B’→75‘C’→60Three keys; B gives 75

A list indexes from 0, so [12, 8, 15, 20] has length 4 and totals 55. A stack is last in, first out: push 12, 8 and 15 and the pop order is 15, 8, 12. A queue is first in, first out: add 12, 8 and 15 and the order out is 12, 8, 15. A dictionary finds a value by key, and with keys A, B and C holding 90, 75 and 60, looking up B takes one step. Choose by the question: ordered access, last in first out, or lookup by name?

Sanity check (must teach):Index and length must agree: four elements run 0 to 3, and the third element is index 2 holding 15. Recompute the total, since 12 plus 8 plus 15 plus 20 is 55 while 35 only adds the first three. A stack must reverse its input to 15, 8, 12 and a queue must keep the order 12, 8, 15, so their first outputs differ, which is the quickest check. A dictionary lookup costs one step whatever the number of keys, while a linear search over three items that proves absence costs three comparisons. Identical stack and queue orders mean the rule has not been grasped.

05 Three independent practice questions

Question Answer What to observe
What are the length and the last index of [12, 8, 15, 20]? Length 4, last index 3 Index 4 means one-based indexing
Push 12, 8 and 15, then pop twice. What remains? 12, since 15 goes first and then 8 15 remaining means first in, first out was used
Keys A, B and C hold 90, 75 and 60. What does a lookup of C return? 60, found directly by key Three treats the key as an index

06 Common errors and correction lines

Error Student usually writes Tutor says
Index from one “The third element is index 3” “Indices start at 0, so the third is index 2, and index 3 is the last slot.”
Stack and queue confused “Push 12, 8, 15 and pop 12, 8, 15” “A stack is last in, first out, giving 15, 8, 12; first in, first out is the queue.”
Total drops a term “12 plus 8 plus 15 is 55” “Four elements need four terms, and 12 plus 8 plus 15 plus 20 is 55.”
Name lookup by list “Finding the score for B means comparing from the first item” “A dictionary looks up by key in one step without scanning.”

07 Homework (paper and question numbers)

08 Exit check (last 3 minutes)

Question Answer Verdict
What is the total of [12, 8, 15, 20]? 55 35 drops the last element; reteach act one
What is the first pop after pushing 12, 8 and 15? 15, because it is last in, first out 12 means the queue rule was used; reteach act two
Which structure finds a score by student name? A dictionary, using the name as key A list misses key lookup; reteach act three

09 Tutor FAQ

Which year is this page for?

S3 Term 2, the data structures unit in local secondary ICT; S4 moves on to files and database records.

Is 45 minutes enough for four structures?

Yes. Nine minutes on lists, nine each on stacks and queues and eight on dictionaries, with the rest for practice and the exit check.

Is there a matching worksheet?

Yes. The homework links to questions 2 and 4 of set 1 and questions 2 and 7 of set 2 of the S3 Python loops 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 →