SLIDE 1
CSZone.co.uk
Click to advance · Arrow keys also work
Edexcel 1CP2 · Topic 2 · 2.4a

Abstract
Data Types

ADTs · Arrays · Records · Static vs Dynamic Structures

CSZoneEdexcel GCSE Computer Science 1CP2
What is an Abstract Data Type?

Defining by Behaviour, Not Implementation

An Abstract Data Type (ADT) defines a data structure by what operations it supports and what data it holds — not how it is implemented in memory. Examples: stack, queue, list.
Concrete types: arrays, records — their implementation details are fixed in memory
Abstract types: stack, queue — defined by operations (push/pop, enqueue/dequeue) regardless of underlying storage
ADTs allow programmers to think at a higher level without worrying about memory management
Arrays

Fixed-Size, Indexed, One Data Type

An array stores a fixed number of elements of the same data type in contiguous memory, accessed by index. In Python, lists are used; Edexcel pseudocode uses array notation.
0-indexed (Python): scores[0] is the first element
Fixed size: cannot grow or shrink without creating a new array
Fast access by index — O(1) time complexity to access any element
Static vs Dynamic Data Structures

Fixed vs Flexible Memory

Static: size fixed at compile time (e.g. array). Cannot grow. Memory is pre-allocated. May waste memory if not all slots used. Simple and fast.
Dynamic: size changes at runtime (e.g. Python list, linked list). Uses only memory needed. More complex. Slower due to memory management overhead.
Edexcel may ask you to compare: static wastes memory; dynamic uses only what it needs but has overhead
Exam Practice

Have a go at this question

Edexcel-style question
Explain the difference between a static and a dynamic data structure. Give one advantage of each.
4 marks
Static: fixed size defined when created — advantage: simple and fast to access [1+1].
Dynamic: size can grow or shrink at runtime — advantage: uses only as much memory as needed [1+1].
Key Takeaways

What to Remember

ADT: defined by operations, not memory layout
Array: same data type, fixed size, 0-indexed, O(1) access
Static: pre-allocated, simple, may waste memory
Dynamic: flexible size, uses only memory needed, more overhead