T-Level DigitalYears 12–13Digital Production, Design and Development

Data structures — arrays, lists, hash maps, trees

T-Level: Digital Production, Design & Development: Data structures — arrays, lists, hash maps, trees

What you'll learn

  1. 1

    Imagine you're organising a music playlist. A list holds songs in order, like a queue. An array is a fixed-size list where each slot has a number (index).

  2. 2

    In an array, what does each slot have?

  3. 3

    Let's make an array of 4 favourite fruits: [🍎, 🍌, 🍊, 🍇]. The first slot (index 0) is 🍎. The second (index 1) is 🍌. The third (index 2) is 🍊. The fourth (index 3) is 🍇.

  4. 4

    Add a new song to your playlist array. The array has 5 slots (0 to 4). Put 🎶 in the last slot (index 4).

  5. 5

    A hash map is like a coat check — you give a label (key) and get back your coat (value). It's super fast for finding things by name.

  6. 6

    In a hash map, what do you use to find a value?

  7. 7

    A tree is like a family tree or a folder structure on your computer. It has a root (top), branches, and leaves (items). Each item can have children.

  8. 8

    What is the top of a tree called?

Practise Data structures — arrays, lists, hash maps, trees with Whizlo

Free AI-tutored lessons, unlimited practice questions, and progress tracking for ages 16–18. Aligned to the UK National Curriculum.