AQA A-Level Computer Science 4.3 Fundamentals of algorithms: traversal, searching, sorting, Dijkstra and Big-O
A deep-dive AQA A-Level Computer Science guide to 4.3 Fundamentals of algorithms. Covers graph and tree traversal, linear and binary search, bubble and merge sort, Dijkstra's shortest path, and Big-O time and space complexity with the common orders of growth.
Reviewed by: AI editorial process; not yet individually human-reviewed
Jump to a section
What 4.3 actually demands
Algorithms turn data structures into solutions. AQA expects you to trace each standard algorithm by hand, state its time complexity in Big-O, and compare algorithms to justify a choice. This module pairs directly with 4.2: traversal works on graphs and trees, search and sort on lists, and Dijkstra on weighted graphs.
Traversal
Depth-first traversal explores as far as possible down a branch before backtracking and uses a stack (or recursion); breadth-first traversal explores level by level and uses a queue. For binary trees, pre-order visits the node first, in-order visits it in the middle (giving sorted order in a BST), and post-order visits it last.
Searching and sorting
Linear search checks each item, , on any list; binary search halves a sorted list each step, . Bubble sort swaps adjacent items, , simple and in place; merge sort splits and merges by divide and conquer, , faster but using extra memory.
Dijkstra's shortest path
Dijkstra's algorithm finds the lowest-cost path from a start vertex through a weighted graph with non-negative weights, using a priority queue to pick the nearest unvisited vertex, relaxing neighbours and finalising vertices one at a time. It powers satnav and network routing.
Big-O complexity
Big-O expresses how time or memory grows with input size, keeping the dominant term. Learn the order from to , how to read complexity from loop structure (one loop , nested loops ), and the difference between tractable and intractable problems.
Check your knowledge
- State which data structure depth-first traversal uses and which breadth-first uses. (2 marks)
- State the order of nodes for an in-order traversal of a binary tree. (1 mark)
- State the requirement binary search has that linear search does not. (1 mark)
- Give the worst-case complexity of linear search and binary search. (2 marks)
- State the time complexity of bubble sort and merge sort. (2 marks)
- Give one advantage of bubble sort over merge sort. (1 mark)
- State what Dijkstra's algorithm finds and why it uses a priority queue. (2 marks)
- Put , and in order from most to least efficient. (1 mark)
Sources & how we know this
- AQA A-level Computer Science (7517) specification — AQA (2015)