In simple terms
A friendly intro before the formal notes — no formulas yet.
The Recipe for Solving Problems
An algorithm is simply a precise, step-by-step set of instructions designed to perform a task or solve a problem. Think of it as the logical blueprint that tells a computer exactly what to do, from start to finish.
Imagine you're baking a cake. The recipe you follow is an algorithm. It lists the ingredients (inputs), provides a sequence of clear instructions to mix them (the process), and describes the final delicious cake (the output). If any step is vague or missing, you might not get the cake you expected; the same is true for computer algorithms.
- 1
Define the Problem: Clearly identify the inputs, the required processing, and the expected outputs.
- 2
Decompose into Steps: Break the overall problem down into smaller, more manageable sub-tasks.
- 3
Sequence and Structure: Arrange the steps logically using sequence, selection (IFs), and iteration (loops).
- 4
Refine and Test: Review the algorithm for clarity and correctness. Trace it with sample data to find any errors.
Explore the concept
Use the live diagram and synced steps — play it or tap a step card to walk through.
Full topic notes
Formal explanation with the rigour you need for the exam.
The Five Essential Properties of an Algorithm
For a set of instructions to be formally considered an algorithm, it must possess five key properties. When you're designing a solution for an exam question, mentally checking against these properties can help ensure your logic is sound.
Finiteness: The algorithm must eventually stop after a finite number of steps. An infinite loop, for example, violates this property.
Definiteness: Every step must be precisely and unambiguously defined. For example, 'Add 5 or 6' is ambiguous; 'Add 5' is definite.
Input: An algorithm takes zero or more inputs. These are the values on which the algorithm will operate.
Output: An algorithm produces at least one output. This is the result of the computation, the solution to the problem.
Effectiveness: Each instruction must be simple enough that it can be carried out in a finite amount of time. It must be practically possible to execute the step.
Representing Algorithms
In your A-Level course, you'll use two primary methods to describe and communicate algorithms: pseudocode and flowcharts. Pseudocode is a text-based description that uses English-like statements and programming conventions. Flowcharts are diagrammatic, using standard shapes to represent actions, decisions, and the flow of control. While you must be able to read and interpret both, exam questions will most often ask you to write your solutions in pseudocode.
Algorithm Design with Selection
Most algorithms are not just a simple sequence of steps. They need to make decisions based on the data they are processing. This is achieved using 'selection'. The most common selection structure is the IF...THEN...ELSE statement, which allows the algorithm to follow different paths depending on whether a condition is true or false.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
An algorithm is required to calculate the area of a rectangle. It should take the length and width as inputs, calculate the area, and display the result. Write the algorithm in pseudocode.
- 1
Identify inputs, processes, and outputs:
A cinema offers discounted tickets to customers who are 15 years old or younger, or 65 years old or older. Write an algorithm in pseudocode that inputs a customer's age and outputs either 'Discount applies' or 'Full price payable'.
- 1
Identify inputs, processes, and outputs:
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
What is an algorithm?
A finite, ordered set of unambiguous, step-by-step instructions designed to solve a specific problem or perform a computation.
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
Finiteness: The algorithm must eventually stop after a finite number of steps. An infinite loop, for example, violates this property.
- ✓
Definiteness: Every step must be precisely and unambiguously defined. For example, 'Add 5 or 6' is ambiguous; 'Add 5' is definite.
- ✓
Input: An algorithm takes zero or more inputs. These are the values on which the algorithm will operate.
- ✓
Output: An algorithm produces at least one output. This is the result of the computation, the solution to the problem.
- ✓
Effectiveness: Each instruction must be simple enough that it can be carried out in a finite amount of time. It must be practically possible to execute the step.
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Practice Algorithm Questions
Practice Algorithm Questions
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Practice Algorithm Questions on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.