Preview
IB DP Computer Science — B2 Programming — Data structures | SL | B2.2.1
📋 What You Will Learn
- Define static and dynamic data structures and identify examples of each
- Describe how each type allocates memory, and what happens when it needs to grow
- Explain why a "full" static array can only grow by copying into a new, larger array
- Compare the two types on speed, memory usage and flexibility
- Justify the choice of structure for a given scenario
🥚 Why This Matters An egg carton has exactly 12 moulded slots — you know its size the moment you pick it up, and a 13th egg simply does not fit. A shopping bag stretches to hold whatever you keep adding. Static structures are the carton; dynamic structures are the bag — and each is the right container for a different job.
The Two Kinds of Structure
📖 Definition — Static data structure A data structure whose size is fixed when it is created and cannot change while the