aimnova.
DashboardMy LearningPaper MasteryStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aimnova.

AI-powered study platform for smarter revision, past-paper analysis and examiner-style feedback.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.8afc4e3

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesComputer Science HLTopic 6.2Static vs dynamic structures
Back to Computer Science HL Topics
6.2.14 min read

Static vs dynamic structures (Computer Science HL)

IB Computer Science • Unit 6

Exam preparation

Practice the questions examiners actually ask

Our question bank mirrors real IB exam papers. Practice under timed conditions and track your progress across topics.

Start Practicing

Contents

  • Decided in advance, or as you go
  • What fixed size buys and costs
  • Choosing between them
  • Exam-style question
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.
Start Studying Free Full access to Aimnova Pro · cancel anytime

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.

Try Mock Exams FreeYour first topic is free to keep • No credit card required
1

Known, fixed size — static

2

Unknown or changing size — dynamic

3

Very large and tightly packed — static

4

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.
IB-style questionCompare[5 marks]

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.

Claim your free topic

Try an IB Exam Question — Free AI Feedback

Test yourself on Static vs dynamic structures. Write your answer and get instant AI feedback — just like a real IB examiner.

one example of a static and one of a dynamic data structure. [1 mark]

Related Computer Science HL Topics

Continue learning with these related topics from the same unit:

6.1.1Variables and data types
6.1.2Substrings
6.1.3Exception handling
6.1.4Debugging
View all Computer Science HL topics

Improve your exam technique

Command terms, paper structure, and mark-scheme tips for Computer Science HL

Previous
6.1.4Debugging
Next
Arrays and lists6.2.2

20 exam-style questions ready for you

Students who practice on Aimnova improve their scores by 15% on average. Get instant feedback that shows exactly how to improve your answers.

Practice Now — FreeView All Computer Science HL Topics