The big idea: A static structure has its size fixed when it is created, and that memory is set aside in one block.
A dynamic structure grows and shrinks while the program runs, taking more memory when it needs it.
The names you will meet: A plain array is static: 30 places, fixed.
A Python list or a Java ArrayList is dynamic: add and remove as you like.
Free preview
This is the free notes preview
You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:
- FlashcardsLock in vocabulary and key terms with spaced repetition.
- Practice questionsAnswer exam-style questions and get instant AI marking.
- Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
- Personalised study planA daily plan built around your exam date and weak areas.
Static — an array
- Size fixed at creation; one contiguous block of memory
- Fast — position 20 is found by arithmetic, not by searching
- No wasted effort resizing, because it never resizes
- Unused places still occupy memory
- Running out means creating a bigger one and copying
Dynamic — a list
- Grows and shrinks as the program runs
- Uses only what it currently needs
- Flexible — you need not know the size in advance
- Growing sometimes means moving everything to a bigger block
- A little slower, and uses some extra memory for bookkeeping
Why a static array is fast: Everything sits in one block, each item the same size. So the address of item 20 is just the start plus twenty item-widths — one calculation.
Nothing is searched for, which is why reading by position is O(1).
What growing actually costs: A dynamic structure that outgrows its block must claim a bigger one and copy everything across.
That single operation is expensive — but it happens rarely, so the average cost of adding stays low.
Know your predicted grade
Take timed mock exams and get detailed feedback on every answer. See exactly where you're losing marks.
Known, fixed size — static
Unknown or changing size — dynamic
Very large and tightly packed — static
Frequent adding and removing — dynamic
The honest summary: Static trades flexibility for speed and predictability. Dynamic trades a little speed and memory for not having to know the future.
Most modern code uses dynamic structures by default, and reaches for arrays when the size is genuinely fixed.
How this is tested — you must compare on the guide's own factors — speed, memory and flexibility. It comes up two ways:
Paper 2 — working with code
- Compare static and dynamic structures, 3-5 marks
- Choose one for a described scenario
- Explain what happens when a structure grows
Paper 2 — the algorithmic-thinking question
- Justify a choice from how the data behaves
- Explain the cost of resizing, with no code shown
The classic trap: Saying dynamic is better because it is flexible. Flexibility is one factor of three — a static array is faster and uses memory more predictably, which is why fixed-size data still uses one.
A weather station records a temperature every hour for a year, and separately keeps a list of alerts raised, which may be none or hundreds. Compare static and dynamic structures for each.
Model answer plan
See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.