Data structures is the chapter in S6 ICT that joins how data is stored to how fast a program runs. The same task solved with an array and with a linked list can look identical in code yet differ by tens of times in running time and memory. The exam does not test names; it tests whether you can use operation counts to explain why one structure wins in one situation.
The first is order: last in first out and first in first out follow from the number of openings, since a stack has one and a queue has an entry and an exit. The second is cost: every operation answers three numbers, how many elements shift, how many nodes are walked and how many comparisons are made. The third is degeneration: sorted input turns a binary search tree into a chain, so its height grows from log n to n and searching a thousand nodes falls from ten comparisons to a thousand.
Three habits earn marks: write out the real state of the structure after each push, pop or dequeue; turn Big-O into a concrete count, because a thousand items give a million steps at n squared and about ten thousand at n log n; and keep the unit straight, since a matrix is counted in cells, an adjacency list in entries and a queue in items.
Three papers build up in difficulty, ten items each, with answers and a one-line explanation; every figure is computed and checked by script, so they work as independent practice or as tutor preparation.
Need a tutor for this chapter? Register here and we match a tutor to your school’s progress.
Why must a binary search start from sorted data?
Because it discards half the range on the assumption that everything beyond the middle is larger, and unsorted data can hide the target in the discarded half.
Matrix or adjacency list?
Judge by density. A graph with a hundred vertices and three hundred edges needs ten thousand cells as a matrix but only six hundred entries as a list, so a list wins for sparse graphs.

