A-Level Computer Science Revision

Algorithms & Computation

Searching, sorting and graph algorithms, recursion, Big-O complexity and the theory of computation.

Algorithms & Computation is a core part of A-Level Computer Science. Revise the key concepts and common mistakes below, then lock them in with the free games.

Key concepts

AlgorithmA precise step-by-step method for solving a problem.
Pseudocode & flowchartsWays to express an algorithm before coding.
SearchingLinear search (any list) and binary search (sorted list).
SortingOrdering data, e.g. bubble, merge and insertion sort.
DecompositionBreaking a problem into smaller parts.
AbstractionHiding unnecessary detail to focus on what matters.
Binary TreeA tree where each node has at most two children.
GraphA set of vertices connected by edges, directed or undirected.
Hash TableA structure mapping keys to values using a hash function.
DFSDepth-first search — explores as deep as possible before backtracking.
BFSBreadth-first search — explores all neighbours before going deeper.
CollisionWhen two keys hash to the same slot in a hash table.
Merge SortA divide-and-conquer sort with O(n log n) time complexity.
QuicksortA divide-and-conquer sort averaging O(n log n), worst O(n^2).

Common mistakes to avoid

Questions where students often pick the tempting wrong answer — make sure you know the right one:

Does Big-O notation tell you how many seconds an algorithm will take?✗ Yes - O(n) means the algorithm takes n seconds to run.   ✓ No - Big-O describes the growth rate of work relative to input size, ignoring constants and hardware; actual seconds depend on the machine and implementation.
Is quicksort always faster than merge sort?✗ Yes - the name quicksort means it is the fastest sort in all cases.   ✓ No - quicksort averages O(n log n) but degrades to O(n^2) with poor pivots, while merge sort guarantees O(n log n) in every case.
A* differs from Dijkstra's algorithm because A*:✗ Only works on unweighted graphs   ✓ Adds a heuristic estimate of the distance remaining to the goal
What is the worst-case complexity of bubble sort?✗ O(n) because it just passes through the list.   ✓ O(n squared).
What is the denary value of binary 10110?✗ 10110 (treating it as a denary number).   ✓ 22 (16 + 4 + 2).

Practise Algorithms & Computation — free games

Test yourself with these quick revision games for this topic:

See all 17 games in the Subjects Arcade →

More A-Level Computer Science topics

← All revision guides

Want to revise every topic this smart?

The Velvet Method teaches you to use AI to revise any subject — £25, lifetime access.

Explore the Course →