What Is an Algorithm? A KS3 Computing Guide

An algorithm is a precise, ordered set of steps for solving a problem or completing a task. In KS3 computing, students learn to design, write and evaluate algorithms before turning them into code — making it one of the first and most important concepts in the entire computing curriculum.

Why do algorithms matter in KS3 computing?

The DfE national curriculum for computing requires KS3 students to "design, use and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems" and to "understand simple Boolean logic." At the heart of all of this lies the algorithm. Every program ever written — from a pocket calculator to a streaming service — runs an algorithm. Understanding what one is, and how to build a good one, is the gateway skill.

What makes something an algorithm?

An algorithm must have three properties:

Finiteness — it must eventually stop. A set of instructions that loops forever is not a useful algorithm.

Definiteness — every step must be clear and unambiguous. "Stir the sauce until it is right" is not a valid step because "right" means different things to different people.

Effectiveness — each step must be something that can actually be carried out. "Guess the correct answer" is not an effective step.

If your instructions meet all three conditions, you have an algorithm.

Everyday algorithms: examples from real life

Before students write code, it helps to see that algorithms are everywhere outside computing:

Making a cup of tea — boil kettle, add tea bag to cup, pour water, wait 3 minutes, remove bag, add milk. Each step is definite and the whole thing stops once you have a cup of tea.

Finding a name in a phone book — open the book in the middle, check whether the target name comes before or after the current page, then repeat with the relevant half. This is an informal description of a binary search algorithm.

Giving someone directions — "Turn left at the traffic lights, go straight for 200 metres, then take the second right." No step is ambiguous; the set of instructions terminates when you arrive.

The phone-book example is worth pausing on. Flicking through every single page from A to Z would eventually find the name, but it is slow. The divide-and-halve method finds it much faster. This is the core idea behind algorithmic efficiency — not just "does it work?" but "does it work well?"

A worked example: the largest-number algorithm

Suppose you have a list of five numbers and you want to find the largest. Here is a clear algorithm:

Set largest to the first number in the list.

For each remaining number in the list: a. If that number is greater than largest, set largest to that number.

When the list is finished, output largest.

Let us trace this with the list [4, 9, 2, 7, 1]:

Step | Current number | largest so far
Start | — | 4
Step 2 | 9 | 9 (9 > 4)
Step 2 | 2 | 9 (2 < 9, no change)
Step 2 | 7 | 9 (7 < 9, no change)
Step 2 | 1 | 9 (1 < 9, no change)
Output | — | 9

The algorithm correctly identifies 9 as the largest number. Notice that it is systematic: it follows the same steps regardless of which numbers are in the list.

How do algorithms relate to flowcharts and pseudocode?

At KS3 students represent algorithms in two standard ways before writing real code:

Flowcharts use shapes to show the flow of control:

Ovals for Start / Stop

Rectangles for actions (processes)

Diamonds for decisions (yes/no questions)

Arrows showing the direction of flow

Pseudocode is structured English that looks like code but does not follow the exact rules of any programming language. It lets you focus on the logic without worrying about Python syntax errors. The largest-number algorithm above is essentially pseudocode.

Both representations are curriculum requirements. The OCR and AQA GCSE computer science specifications (which build on KS3) require students to read and write both forms, so learning them now has a direct payoff at age 16.

What is the difference between an algorithm and a program?

A program is an algorithm written in a formal programming language that a computer can execute directly. An algorithm is the idea; the program is one specific expression of that idea in code.

The same algorithm can be implemented in Python, JavaScript, Scratch or any other language. The language details change; the underlying logical steps do not. This is why computing teachers ask students to design the algorithm first — getting the logic right matters more than knowing where to put the colons in Python.

Common mistakes students make with algorithms

Skipping steps — students often write "sort the list" as a single step when that is itself an algorithm requiring many steps. A good test: could a robot with no common sense follow these instructions? If a step requires judgement or background knowledge the robot does not have, break it down further.

Infinite loops — a loop that has no stopping condition will run forever. Check: "Is there a way this loop ever exits?"

Off-by-one errors — algorithms that process lists are prone to accidentally skipping the first or last item. Tracing through a worked example (as above) catches these before a line of code is written.

How algorithms connect to the rest of the KS3 curriculum

Algorithms do not stand alone. They feed directly into:

Programming — the algorithm becomes the skeleton of the code.

Decomposition — large problems are broken into smaller sub-algorithms.

Data structures — how data is organised affects which algorithm is most efficient.

Abstraction — complex details are hidden so you can reason about the algorithm without getting lost in specifics.

BBC Bitesize (bbc.co.uk/bitesize/guides/zpp49j6/revision/1) groups algorithms within the broader topic of computational thinking — the habit of approaching any problem the way a computer scientist would.

Frequently asked questions

What is an algorithm in simple terms for KS3?

An algorithm is a list of clear, step-by-step instructions for solving a problem. The steps must be in the right order, each must be unambiguous, and the instructions must eventually finish. A recipe, a set of directions, and the steps a computer follows when sorting a list are all algorithms.

Do you have to code to understand algorithms?

No. Algorithms can be described in plain English, as flowcharts, or as pseudocode — all without writing a single line of code. Understanding the logic of an algorithm is a separate skill from translating it into Python or another programming language.

What is an example of an algorithm in everyday life?

Searching for a contact in your phone's address book by typing the first letter of their name is an algorithm. So is a traffic-light sequence, a recipe, or the steps a cashier follows when giving change. Any process with clear, repeatable steps for reaching a result is an algorithm.

Why do KS3 computing lessons focus so much on algorithms?

Because algorithms are the foundation of all programming. A student who can design a clear algorithm can learn any programming language more easily, debug code more reliably, and reason about more complex problems in KS4 and beyond. The DfE national curriculum for computing explicitly requires KS3 students to design and evaluate algorithms.

How is an algorithm different from a recipe?

A recipe is a good everyday analogy for an algorithm, and some recipes are proper algorithms. The main difference is precision: a recipe might say "season to taste," which a human can interpret but a computer cannot. An algorithm requires every step to be completely unambiguous. When teachers draw the analogy, they mean that both are ordered sets of instructions aimed at a specific goal — the distinction is in the required level of exactness.

For Socratic computing tutoring — from algorithms to Python — see aitutors.me.