Study Guide

Unit Overview

Data types & structures

CIE A-Level Computer ScienceΒ· 5 min read πŸ“Š n/a

1. Unit at a glance

This unit progresses from the most basic building blocks of data (primitive types) up to increasingly complex composite structures used to solve real-world computational problems. We first cover fundamental linear structures, then move to non-linear structures that model more complex relationships between data.

Mastery of this topic is critical for writing efficient code and answering problem-solving questions across the entire CIE 9618 syllabus. The choice of data structure directly impacts the efficiency of any algorithm you implement.

2. Common Pitfalls

Wrong move:

Confusing stack and queue order of operations

Why:

Mixing up LIFO vs FIFO leads to incorrect solutions for common problems like expression evaluation.

Correct move:

Remember: Stack = Last In First Out (like a plate stack), Queue = First In First Out (like a checkout line).

Wrong move:

Selecting a data structure without evaluating tradeoffs

Why:

Arrays have fast access but slow insertion, while linked lists are the opposite, leading to inefficient solutions.

Correct move:

Always check what operations you will perform most before selecting a data structure.

Wrong move:

Treating all data structures as linear

Why:

Incorrect classification of trees and graphs leads to wrong traversal logic and property answers.

Correct move:

Always first classify a structure as linear or non-linear when analyzing its behavior.

3. Quick Reference Cheatsheet

Concept

Key Rule / Definition

Primitive data types

Atomic single-value types: integer, float, boolean, character

Static array access

Random access to any element takes time

Linked list insertion

Insertion/deletion at a known node takes time

Stack property

Follows Last-In-First-Out (LIFO) access order

Queue property

Follows First-In-First-Out (FIFO) access order

Binary tree rule

Each node can have at most 2 child nodes (left and right)

Graph storage

Commonly stored as an adjacency matrix or adjacency list

Hash table average lookup

Average case key lookup takes time

Record definition

Composite type that stores multiple heterogeneous related fields

What's Next

Start with the first sub-topic of this unit, which covers primitive data types β€” the foundational building blocks for all other data structures you will learn in this unit. Once you complete all sub-topics here, move on to the next unit on algorithms to see how these data structures are used to solve common computational problems.