S6 Term 1 | ICT: Data Structures and Program Tracing – Stacks, Queues, Linked Lists, Postfix and Binary Search | Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers
- 2026-12-05
Tutor lesson plan · S6 Term 1 ICT
Data structure questions are not vocabulary tests: they ask for the intermediate state at every step. This lesson fixes one traceable set of steps for stacks, queues, linked lists and binary search, so every later tracing question is filled in the same table.
01 Prior knowledge check (first 3 minutes)
If any item below is not secure, fix it before this lesson:
| Skill | Quick check | Pass standard |
|---|---|---|
| Skill: powers of two | What is 2 to the tenth power | 1,024; otherwise learn the powers first |
| Skill: pointers | How many parts does a node need to reach the next node | The data and one next pointer |
| Skill: operator order | In 6 2 3 * which step comes first | The star multiplies the two nearest values |
02 Lesson flow (45 minutes)
| Time | Stage | Tutor does | Student does |
|---|---|---|---|
| 0-5 min | Diagnose | Ask which end a stack and a queue take from; write last in first out and first in first out | Answers orally with one example each |
| 5-14 min | Six stack steps | Trace push 3, push 7, push 5, pop, push 1, pop and write the whole stack each time | Fills the six cells and finds the top is 7 |
| 14-23 min | Postfix evaluation | Evaluate 6 2 3 * – 4 2 / + with the same stack | Writes each intermediate value and ends at 2 |
| 23-31 min | Queue and linked list | Two dequeues then enqueue F, G, H give front C, rear H and length 6; a head insert changes 2 pointers | Draws six cells and counts the pointer changes |
| 31-40 min | Binary search | Halving 1,024 gives 10 steps; linear averages 512, a factor of 51 | Counts the halvings itself |
| 40-45 min | Exit check | Collect three items and note the failure type | Answers without notes |
03 Teaching script (read it aloud)
Act 1: the stack and where its top is
Ask the student to repeat: “Three pushes, one pop, one push, one pop leave [3, 7] with 7 on top.”
Act 2: postfix is a stack in action
Ask the student to repeat: “Numbers go in, an operator takes two and puts one back, and the last value is the answer.”
Act 3: queues, linked lists and binary search
Ask the student to repeat: “Queue is first in first out, front C and rear H; binary search 10 steps against 512, 51 times.”
04 Question types and steps
| Type | Example | Steps | Answer |
|---|---|---|---|
| Stack tracing | push 3, 7, 5, pop, push 1, pop | Write the whole stack each step; pop takes the top | Leaves [3, 7], top 7 |
| Postfix evaluation | 6 2 3 * – 4 2 / + | Numbers in, operator takes two and pushes one | 2 |
| Queue operations | [A, B, C, D, E], two dequeues, enqueue F, G, H | Dequeue moves front, enqueue moves rear | Length 6, front C, rear H |
| Complexity | 1,024 items | Binary uses log base two; linear uses half | 10 against 512, 51 times |
Left: six operations stacked one per column; pop takes the top, leaving [3, 7]. Middle: two dequeues then three enqueues give front C and rear H. Bottom: each operator in a postfix string combines the two most recent values; the last value is 2. The comparison shows why 1,024 items call for binary search: 512 checks on average against 10.
05 Three independent practice questions
| Question | Answer | What to observe |
|---|---|---|
| Push 4, push 9, push 2, pop, push 6, pop, pop: what is left and what is on top? | push 4 gives [4]; push 9 gives [4, 9]; push 2 gives [4, 9, 2]; pop leaves [4, 9]; push 6 gives [4, 9, 6]; pop leaves [4, 9]; pop leaves [4]. The stack is [4] with 4 on top. | Whether every step is written out |
| Evaluate the postfix string 5 1 2 + 4 * + 3 -. | Push 5, 1 and 2; plus gives 3, so [5, 3]; push 4 and the star gives 12, so [5, 12]; plus gives 17; push 3 and minus gives 14. | Whether minus uses the second value first |
| Binary search on 2,048 sorted items: most comparisons, and the linear average? | 2,048 is 2 to the eleventh, so 11 comparisons; linear averages 1,024; the ratio is about 93 times. | Whether half of 2,048 or of 1,024 was used |
06 Common errors and correction lines
| Error | Student usually writes | Tutor says |
|---|---|---|
| Pop treated as a clear | “After pop the stack is empty” | “Pop removes the top item only; the rest stays.” |
| Postfix operands reversed | “6 2 3 * minus should be 0 minus 6” | “The second value popped is written first, so 6 minus 6 is 0.” |
| Binary steps guessed | “About 100 checks for 1,024” | “Halve each time: 1,024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, so 10.” |
| Queue length wrong | “Two dequeues and three enqueues leave 5” | “5 minus 2 plus 3 is 6, front C and rear H.” |
07 Homework (paper and question numbers)
- S6 ICT paper (set 2), question 1: the push and pop sequence and the final stack The answer must show all six states, the same table as act one
- Question 2: step-by-step evaluation of 6 2 3 * – 4 2 / + The answer is 2, with each intermediate stack written down
- Question 3: a queue after two dequeues and three enqueues Length 6, front C, rear H, which checks act three
- Question 4: pointer changes for a head insert and binary search steps Two pointers and 10 steps for 1,024, both with reasons
08 Exit check (last 3 minutes)
| Question | Answer | Verdict |
|---|---|---|
| Which two values remain in the stack after six operations, and which is on top? | [3, 7], 7 on top | Answering [3, 7, 5] means a pop was missed: reteach act one |
| What is 6 2 3 * – 4 2 / +? | 2 | Answering -6 or 6 means the operand order is reversed: reteach act two |
| How many comparisons does binary search need on 1,024 items? | 10 | Answering 512 or 100 means halving is not secure: reteach act three |
09 Tutor FAQ
Which year is this for?
S6 Term 1 ICT, in the programming and data structures unit. S3 covered flowcharts and arrays; this lesson fixes stacks, queues, linked lists and complexity in one tracing table.
Does 45 minutes cover it?
It covers one trace for each structure plus one complexity comparison. Tree and graph traversal need a separate lesson.
Is there a paper to go with it?
Yes. Homework links to questions 1 to 4 of the S6 ICT paper (set 2), covering the stack, postfix evaluation, the queue and the pointer and search count.
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.



