Signed up recently but had issues with the confirmation email?

Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.

Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.

Revision notesQuestionsFor schools
Revise Computing
Log inStart revising free
Revision notesQuestionsFor schoolsLog in

© 2026 Revise Computing · revisecomputing.co.uk

Worried about something?Question Bank UpdatesPrivacy noticeTermsContact

Revise Computing is an independent revision resource. It is not affiliated with, or endorsed by, OCR (Oxford Cambridge and RSA Examinations).

Knowledge/A Level/H446/01 Computer systems/Data Structures/Linked list, graph, stack, queue, tree…

Linked list, graph, stack, queue, tree, binary search tree and hash table

The following structures to store data: linked-list, graph (directed and undirected), stack, queue, tree, binary search tree, hash table

1.4.2 Data Structures

Practise exam questions

Data Structures — Note 2 of 3

Candidates need to have an understanding of the behaviour of linked-lists, graphs, stacks, queues, trees, binary search trees and hash tables. Candidates need to be able be aware of how the aforementioned data structures can be implemented. We would recommend a general understanding of these principles that can be applied to a given scenario rather than trying to memorise code patterns.

What you need to know

Abstract data structures model data in ways that suit particular problems. You need to understand how each behaves, what it is used for and how it can be implemented, rather than memorising code.

What to know

  • Stack errors: overflow (pushing onto a full stack) and underflow (popping from an empty stack).

Key terms

Linked list

A dynamic structure of nodes, each holding data and a pointer to the next node. A start pointer gives the first node. Items can be added or removed by changing pointers, without moving other data. The last node's pointer is null; items are reached by following pointers, not by index.

Stack

A LIFO (last in, first out) structure. push adds to the top, pop removes from the top, peek looks at the top item. Uses: undo, the call stack, backtracking, reversing.

Queue

A FIFO (first in, first out) structure. Items are enqueued at the rear and dequeued from the front. Uses: print queues, keyboard buffers, breadth-first search.

Circular queue

When the rear pointer reaches the end of the array it wraps around to the start, reusing freed spaces.

Graph

A set of nodes (vertices) connected by edges (arcs). Edges can be directed or undirected and weighted (e.g. distances). Stored as an adjacency matrix or adjacency list.

Tree

A connected graph with no cycles, with a root node and child nodes in a hierarchy. Nodes with no children are leaves.

Binary search tree

Each node has at most two children; values less than the node go in the left subtree and greater values in the right subtree, allowing fast searching. Each comparison halves the nodes left, O(log n), but only while the tree is balanced; the worst case is O(n).

Hash table

Data is stored at a location calculated by applying a hash function to its key, so it can be found directly. Collisions (two keys giving the same location) are handled e.g. by placing the item in the next free space or by chaining a list at that location.

Exam technique

  • Tip:Comparing a dynamic structure (e.g. a linked list) with a static one (e.g. an array)? For the benefit, mention SIZE: it can grow or shrink while the program is running ('it can change' on its own is too vague). For the drawback, say WHY it needs more memory: every node also stores a pointer. Slower access (following pointers rather than going straight to an index) is another drawback.
  • Tip:Say exactly what each pointer points to: a stack's top pointer gives the top item; a queue's front pointer the next item to remove and its rear pointer the last item added (or the next free space, if the question uses that convention). 'The start of the queue' is too vague. A stack has only ONE pointer, because items are added and removed at the same end: head and tail pointers belong to a queue. Asked for two features of a stack, give two different ones, not a description of push and pop.
  • Mistake:Saying the nodes of a weighted graph carry the weights, or calling the edges 'paths'. The weights belong to the EDGES (e.g. the travel time between two stations), and the lines are edges or arcs. When you describe a graph you are given, link each feature to the scenario: say what a node and an edge stand for, not just that it 'has nodes and edges'.
  • Tip:Comparing search speed? Linked list: node by node from the start, O(n). Balanced BST: halves what is left each step, O(log n). Hash table: straight to the location, O(1) while collisions are few. Say WHAT is quicker: 'quicker' alone scores nothing.
  • Tip:Learn the behaviour (LIFO/FIFO, the ordering rule of a BST) and be able to draw each structure after a series of operations.
  • Mistake:Saying items are removed from the rear of a queue. They are added at the rear and removed from the front.
  • Mistake:Saying every tree node has at most two children, or that graphs differ from trees by being weighted. Only BINARY trees limit children to two, and trees can have weights too. Compare using a root, cycles, hierarchy, directed edges and whether every node is connected.

Past exam questions

  • June 2026Paper 1Q1(b)(ii)2marks
  • June 2026Paper 2Q1(a)(i)2marks
  • June 2026Paper 2Q2(a)3marks
  • June 2026Paper 2Q5(a)2marks
  • June 2025Paper 2Q7(b)2marks
  • June 2025Paper 2Q8(a)3marks
  • June 2024Paper 2Q3(b)4marks
  • June 2024Paper 2Q4(a)2marks
  • June 2024Paper 2Q4(c)2marks
  • June 2024Paper 2Q7(b)(i)2marks
  • June 2024Paper 2Q7(b)(ii)1mark
  • June 2023Paper 1Q2(b)(iii)3marks
  • June 2023Paper 1Q2(c)(i)2marks
  • June 2023Paper 2Q1(a)(i)2marks
  • June 2023Paper 2Q3(a)2marks
  • June 2023Paper 2Q3(b)1mark
  • June 2022Paper 2Q2(a)1mark
  • June 2022Paper 2Q2(b)2marks
  • June 2022Paper 2Q5(a)(i)1mark
  • June 2022Paper 2Q5(a)(ii)1mark
  • June 2022Paper 2Q8(a)(ii)1mark
  • November 2021Paper 1Q7(a)(i)1mark
  • November 2021Paper 1Q7(b)(iii)2marks
  • November 2021Paper 1Q7(b)(iv)2marks
  • November 2021Paper 2Q7(a)4marks
  • November 2020Paper 2Q1(b)1mark
  • November 2020Paper 2Q1(c)1mark
  • November 2020Paper 2Q1(f)4marks
  • November 2020Paper 2Q5(a)2marks
  • November 2020Paper 2Q5(e)3marks
  • November 2020Paper 2Q6(a)(i)2marks
  • November 2020Paper 2Q6(a)(ii)1mark
  • June 2019Paper 1Q5(d)4marks
  • June 2019Paper 1Q5(e)12marks
  • June 2019Paper 2Q1(a)2marks
  • June 2019Paper 2Q2(a)(i)1mark
  • June 2018Paper 2Q3(a)(i)1mark
  • June 2018Paper 2Q6(b)(i)2marks
  • June 2017Paper 1Q2(a)(i)3marks
  • June 2017Paper 1Q2(b)4marks
  • June 2017Paper 1Q10(c)1mark
  • June 2017Paper 2Q2(a)2marks
  • June 2017Paper 2Q4(a)1mark

Ready to test yourself?

Practise 1.4.2 questions
← Previous noteArrays (up to 3 dimensions), records, lists and tuples1.4.2 Data StructuresNext note →How to create, traverse, add data to and remove data from these data structures1.4.2 Data Structures

Back to Data Structures

Data Structures

Note 2 of 3

  1. 1Arrays (up to 3 dimensions), records, lists and tuples
  2. 2Linked list, graph, stack, queue, tree, binary search tree and hash table
  3. 3How to create, traverse, add data to and remove data from these data structures
Topic overview