7. Algorithm Design and Problem-Solving
Program development life cycle, decomposition, flowcharts and pseudocode, standard algorithms (searching, sorting, totalling, counting, max/min), validation and testing with trace tables.
In the 2029–31 syllabus this becomes Topic 9 (Algorithm design) and 10.5 (Testing). The PDLC and pseudocode go; algorithms are written as flowcharts or Python, with binary search and merge sort added. What changes in 2029 → · Study the new topics: 9. Algorithm design, 10. Further programming and testing
Statometer92BankerNext Paper 294%Everything for this topic — study hub
O Level / IGCSE · 2210 · 0478 · Paper 2
This topic is rows 21–26 of the study route.Open it on your study route
Statometer — what 25 real papers say about this topic and each of its 6 syllabus bullets
Banker · #4 of 10 in O Level / IGCSE · recomputed with every new session
Set in nearly every paper and worth a big slice of it — revise first, expect it.
- Next Paper 2
- 94%
- 9 in 10 chance it is set
- Marks a paper
- 22.8 / 75
- 30% of Paper 2 · fair share 25%
- Appeared in
- 25 / 25
- Paper 2 sittings 2023–2026
- Last set
- May/Jun 2026
- 0478/23 · Q5 · 7 marks · 11-series streak
What the papers say
- Set in 25 of 25 Paper 2 sittings on the current syllabus — treat it as certain.
- Worth about 22.8 marks a paper (30% of Paper 2).
- Last set May/Jun 2026 · 0478/23 · Q5 for 7 marks — in the most recent series.
- Set in each of the last 11 series without a miss.
- Steady at around 22.1 marks a paper year on year.
- Lives on “Complete” and “Write” — 53% of its questions: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- 60% of its questions involve a diagram, table or figure — practise with pen and paper.
- 54% of its questions are set out as code, pseudocode or a table to complete.
- Most of its marks (82%) come in extended questions of 6+ marks — plan the answer before writing.
- Its biggest question so far: 16 marks (Oct/Nov 2023 · 0478/21 · Q8).
- Inside the topic, Test data (normal, abnormal, extreme, boundary); trace tables for dry runs; identifying and correcting errors in algorithms carries the most marks (22%) and The program development life cycle the least (3%).
- It is examined mostly as AO2 (Apply to a context, 66%), the rest AO1 (28%) — you must apply it to the scenario or the given data — a definition alone will not score.
- The examiner has commented on 173 of its questions — read “What the examiner said” before you practise.
Command words
Share of questions using the word (a question can use several). What each wants →
Question shapes
- 1–2 mk25
- 3–4 mk58
- 5–6 mk87
- 7–9 mk82
- 10+ mk52
Average 7.1 marks a question · 60% with a figure or table · 54% with code · biggest 16 marks
Assessment objectives — how it is examined
Every part of every current-syllabus question filed under Cambridge's AO1 / AO2 / AO3 (from its command word and what it asks you to do), so you know whether this topic pays for definitions, for applying, or for judging and building.
- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
Paper 2 as a whole
| Paper 2 | Syllabus | Measured |
|---|---|---|
| AO1 Knowledge & understanding | 20% | 27% |
| AO2 Apply to a context | 60% | 51% |
| AO3 Evaluate & judge | 20% | 22% |
Syllabus = Cambridge's grid; measured = the bank's current-syllabus papers.
Inside the topic — every syllabus bullet, measured
Each part of each question is filed under the bullet it examines; the numbers are per Paper 2 sitting, exactly like the topic's. Open a bullet for its own Statometer.
The program development life cycle#16 of 19 on Paper 2Occasional · 3346% next paper1.7 marks12/25 sittings→ May/Jun 2026Occasional · 3346%
1.7 · 3% of topic12/25May/Jun 2026latest series · →Rotated in occasionally — the bullet students skip and then meet.Syllabus: analysis, design, coding and testing, and what happens at each stage
- Next Paper 2
- 46%
- 2 in 4
- Marks a paper
- 1.7
- 2% of the paper · 3% of the topic
- Asked in
- 12 / 25
- Paper 2 sittings · 21 questions
- Last asked
- May/Jun 2026
- 2210/22 · Q4 · 3 marks
- Asked in 12 of 25 Paper 2 sittings — roughly one paper in 2.
- About 1.7 marks a paper (2% of Paper 2; 3% of the topic's marks across its 6 bullets).
- Last asked May/Jun 2026 · 2210/22 · Q4 (3 marks) — in the most recent series.
- Usually “Describe”: full sentences with a reason, not one-word answers.
- Biggest chunk of marks so far: 6 in Feb/Mar 2026 · 0478/22 · Q3.
- It is examined almost entirely as AO1 (Knowledge & understanding, 98%) — definitions and descriptions in syllabus words score.
Last 12 sittings→ SteadyAssessment objectives
AO1 98%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Describe33%
- Identify29%
- State24%
- Write24%
Sub-systems and decomposition (inputs, processes, outputs, storage); designing solutions with structure diagrams, flowcharts and pseudocode#9 of 19 on Paper 2Core · 6079% next paper3.3 marks20/25 sittings↘ May/Jun 2026Core · 6079%
3.3 · 16% of topic20/25May/Jun 2026latest series · ↘A regular earner inside the topic — most papers touch it.
- Next Paper 2
- 79%
- 8 in 10
- Marks a paper
- 3.3
- 4% of the paper · 16% of the topic
- Asked in
- 20 / 25
- Paper 2 sittings · 104 questions
- Last asked
- May/Jun 2026
- 0478/23 · Q5 · 2 marks · 4-series streak
- Asked in 20 of 25 Paper 2 sittings — about 8 papers in 10.
- About 3.3 marks a paper (4% of Paper 2; 16% of the topic's marks across its 6 bullets).
- Last asked May/Jun 2026 · 0478/23 · Q5 (2 marks) — in the most recent series.
- Asked in each of the last 4 series.
- Easing: 3.9 → 2.8 marks a paper.
- Usually “Complete”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 8 in May/Jun 2025 · 0478/23 · Q1.
- It is examined mostly as AO2 (Apply to a context, 64%), the rest AO1 (36%) — you must apply it to the scenario or the given data — a definition alone will not score.
Last 12 sittings↘ EasingAssessment objectives
AO1 36%AO2 64%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Complete53%
- Write20%
- Describe17%
- Explain16%
Explaining the purpose of a given algorithm; standard methods of solution#12 of 19 on Paper 2Regular · 5368% next paper2.9 marks17/25 sittings↘ May/Jun 2026Regular · 5368%
2.9 · 20% of topic17/25May/Jun 2026latest series · ↘Set most sessions for a few marks; know the definition and one example.Syllabus: linear search, bubble sort, totalling, counting, maximum/minimum/average
- Next Paper 2
- 68%
- 7 in 10
- Marks a paper
- 2.9
- 4% of the paper · 20% of the topic
- Asked in
- 17 / 25
- Paper 2 sittings · 90 questions
- Last asked
- May/Jun 2026
- 0478/23 · Q3 · 0.5 marks · 11-series streak
- Asked in 17 of 25 Paper 2 sittings — about 7 papers in 10.
- About 2.9 marks a paper (4% of Paper 2; 20% of the topic's marks across its 6 bullets).
- Last asked May/Jun 2026 · 0478/23 · Q3 (0.5 marks) — in the most recent series.
- Asked in each of the last 11 series.
- Easing: 4.3 → 1.8 marks a paper.
- Usually “Complete” or “Explain”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 8 in Oct/Nov 2024 · 2210/22 · Q4.
- It is examined almost entirely as AO2 (Apply to a context, 80%) — you must apply it to the scenario or the given data — a definition alone will not score.
Last 12 sittings↘ EasingAssessment objectives
AO2 80%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Complete47%
- Explain37%
- Describe33%
- Write28%
Validation checks (range, length, type, presence, format, check digit) and verification checks (visual, double entry)#7 of 19 on Paper 2Core · 6876% next paper4.3 marks20/25 sittings↗ May/Jun 2026Core · 6876%
4.3 · 18% of topic20/25May/Jun 2026latest series · ↗A regular earner inside the topic — most papers touch it.
- Next Paper 2
- 76%
- 8 in 10
- Marks a paper
- 4.3
- 6% of the paper · 18% of the topic
- Asked in
- 20 / 25
- Paper 2 sittings · 87 questions
- Last asked
- May/Jun 2026
- 0478/23 · Q3 · 10 marks · 10-series streak
- Asked in 20 of 25 Paper 2 sittings — about 8 papers in 10.
- About 4.3 marks a paper (6% of Paper 2; 18% of the topic's marks across its 6 bullets).
- Last asked May/Jun 2026 · 0478/23 · Q3 (10 marks) — in the most recent series.
- Asked in each of the last 10 series.
- Rising: 4.3 → 5.1 marks a paper.
- Usually “Explain” or “Give”: full sentences with a reason, not one-word answers.
- Biggest chunk of marks so far: 11 in May/Jun 2026 · 2210/22 · Q3.
- It is examined mostly as AO1 (Knowledge & understanding, 56%), the rest AO2 (34%) — definitions and descriptions in syllabus words score.
Last 12 sittings↗ RisingAssessment objectives
AO1 56%AO2 34%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Explain35%
- Give33%
- Describe32%
- Write31%
Test data (normal, abnormal, extreme, boundary); trace tables for dry runs; identifying and correcting errors in algorithms#3 of 19 on Paper 2Banker · 8387% next paper5.6 marks23/25 sittings→ May/Jun 2026Banker · 8387%
5.6 · 22% of topic23/25May/Jun 2026latest series · →Asked in nearly every paper — the bullet to know cold.
- Next Paper 2
- 87%
- 9 in 10
- Marks a paper
- 5.6
- 7% of the paper · 22% of the topic
- Asked in
- 23 / 25
- Paper 2 sittings · 102 questions
- Last asked
- May/Jun 2026
- 0478/23 · Q5 · 5 marks · 11-series streak
- Asked in 23 of 25 Paper 2 sittings — nearly every paper.
- About 5.6 marks a paper (7% of Paper 2; 22% of the topic's marks across its 6 bullets).
- Last asked May/Jun 2026 · 0478/23 · Q5 (5 marks) — in the most recent series.
- Asked in each of the last 11 series.
- Usually “Complete” or “Describe”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 9 in Oct/Nov 2024 · 2210/23 · Q7.
- It is examined almost entirely as AO2 (Apply to a context, 78%) — you must apply it to the scenario or the given data — a definition alone will not score.
Last 12 sittings→ SteadyAssessment objectives
AO2 78%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Complete51%
- Describe31%
- State24%
- Give24%
Writing and amending algorithms for a scenario in pseudocode, program code and flowcharts#10 of 19 on Paper 2Core · 5865% next paper3.7 marks17/25 sittings↗ May/Jun 2026Core · 5865%
3.7 · 21% of topic17/25May/Jun 2026latest series · ↗A regular earner inside the topic — most papers touch it.
- Next Paper 2
- 65%
- 7 in 10
- Marks a paper
- 3.7
- 5% of the paper · 21% of the topic
- Asked in
- 17 / 25
- Paper 2 sittings · 93 questions
- Last asked
- May/Jun 2026
- 2210/21 · Q10 · 6 marks · 11-series streak
- Asked in 17 of 25 Paper 2 sittings — about 7 papers in 10.
- About 3.7 marks a paper (5% of Paper 2; 21% of the topic's marks across its 6 bullets).
- Last asked May/Jun 2026 · 2210/21 · Q10 (6 marks) — in the most recent series.
- Asked in each of the last 11 series.
- Rising: 2.7 → 4.4 marks a paper.
- Usually “Write” or “Explain”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
- Biggest chunk of marks so far: 8 in May/Jun 2026 · 2210/21 · Q5.
- It is examined almost entirely as AO2 (Apply to a context, 100%) — you must apply it to the scenario or the given data — a definition alone will not score.
Last 12 sittings↗ RisingAssessment objectives
AO2 100%- AO1 Knowledge & understanding
- AO2 Apply to a context
- AO3 Evaluate & judge
- Write71%
- Explain30%
- Describe26%
- State20%
11% of the topic's marks sit in question parts that belong to another topic (scenario questions cross sections) or that no bullet claims; they count for the topic, not for a bullet.
Marks a paper, year by year
Grey years are the previous syllabus (2010–2022, 212 questions) — history, not counted in the rates.
By exam series
- Feb/Mar4/4 · 24.5 mk
- May/Jun12/12 · 21.1 mk
- Oct/Nov9/9 · 25.1 mk
What you need to know6syllabus section 7
- The program development life cycle — analysis, design, coding and testing, and what happens at each stage
- Sub-systems and decomposition (inputs, processes, outputs, storage); designing solutions with structure diagrams, flowcharts and pseudocode
- Explaining the purpose of a given algorithm; standard methods of solution — linear search, bubble sort, totalling, counting, maximum/minimum/average
- Validation checks (range, length, type, presence, format, check digit) and verification checks (visual, double entry)
- Test data (normal, abnormal, extreme, boundary); trace tables for dry runs; identifying and correcting errors in algorithms
- Writing and amending algorithms for a scenario in pseudocode, program code and flowcharts
Video lectures13ZAK's YouTube channel · play here
O LevelAS2023119 views
O LevelAS2021529 views
O LevelUrdu2021376 views
O Level2021610 views
O Level2020849 views
O Level2020734 views
Infographics6draw these the way the examiner expects · download as PNG
Flowchart symbols & the PDLC
Bubble sort & linear search
Choosing test data
Dry run with a trace table (animated)
Decomposing a system into sub-systems (animated)
Linear search vs binary search (animated)
Key terms11use these exact words in the exam
Dotted terms are defined in the glossary.
Code help4referenced to the Cambridge pseudocode guide
DECLARE A : ARRAY[1:6] OF INTEGERDECLARE i, Target : INTEGERDECLARE Found : BOOLEANA[1] ← 8A[2] ← 3A[3] ← 9A[4] ← 1A[5] ← 7A[6] ← 4Target ← 7Found ← FALSEi ← 1WHILE i <= 6 AND NOT Found DOIF A[i] = Target THENFound ← TRUEELSEi ← i + 1ENDIFENDWHILEIF Found THENOUTPUT "Found at position ", iELSEOUTPUT "Not found"ENDIF
DECLARE A : ARRAY[1:5] OF INTEGERDECLARE i, Temp : INTEGERDECLARE Swapped : BOOLEANA[1] ← 5A[2] ← 1A[3] ← 4A[4] ← 2A[5] ← 3REPEATSwapped ← FALSEFOR i ← 1 TO 4IF A[i] > A[i + 1] THENTemp ← A[i]A[i] ← A[i + 1]A[i + 1] ← TempSwapped ← TRUEENDIFNEXT iUNTIL NOT SwappedFOR i ← 1 TO 5OUTPUT A[i]NEXT i
💡 Open the Trace Table tab after running — this is the classic Paper 2 trace question.
DECLARE Marks : ARRAY[1:5] OF INTEGERDECLARE i, Total, Count, Max, Min : INTEGERMarks[1] ← 67Marks[2] ← 91Marks[3] ← 45Marks[4] ← 78Marks[5] ← 84Total ← 0Count ← 0Max ← Marks[1]Min ← Marks[1]FOR i ← 1 TO 5Total ← Total + Marks[i]IF Marks[i] >= 50 THENCount ← Count + 1ENDIFIF Marks[i] > Max THENMax ← Marks[i]ENDIFIF Marks[i] < Min THENMin ← Marks[i]ENDIFNEXT iOUTPUT "Total ", Total, " Passes ", Count, " Max ", Max, " Min ", Min, " Avg ", Total / 5
DECLARE Age : INTEGERREPEATOUTPUT "Enter age 5-120"INPUT AgeIF Age < 5 OR Age > 120 THENOUTPUT "Out of range, try again"ENDIFUNTIL Age >= 5 AND Age <= 120OUTPUT "Accepted ", Age
Playground examples24runnable programs for this topic
- Run
Swap two variables
The three-line swap with a temporary variable — a favourite trace-table question.
- Run
FOR loop & totalling
A count-controlled loop that accumulates a running total.
- Run
WHILE with a sentinel — totalling & counting
Read numbers until -1; INPUT once before the loop and again at the end of the body.
- Run
Maximum, minimum & average
The standard algorithm: start Highest very low and Lowest very high, then update as you go.
- Run
Counting — how many passed?
Two counters updated inside a loop, then a percentage.
- Run
Total, average and position of the maximum
Keep the index of the best value, not just the value, so you can say where it was.
- Run
Range check
Keep asking until the value is between 0 and 100.
- Run
Presence & length checks
Nothing entered? Too short or too long? Say which check failed.
- Run
Type check — digits only
A function that tests every character before the string is converted to a number.
- Run
Format check — is this an email address?
One @ that is not first, and a dot after it that is not last.
- Run
Check digit — ISBN-13
Weights 1 and 3 alternate, total MOD 10, subtract from 10. The classic check-digit algorithm.
- Run
Verification — double entry
Validation checks the data is sensible; verification checks it was entered correctly.
- Run
Trace table practice
A typical dry-run question. Run it, then open the Trace table tab and check it against your own table.
- Run
Normal, boundary and abnormal test data
Drive a function with each kind of test data and check the results against what you expected.
- Run
Linear search
Check each element in turn and stop as soon as the target is found.
- Run
Linear search — every match
Do not stop at the first hit: report every position and count them.
- Run
Bubble sort
Compare neighbours and swap; after each pass the largest value has bubbled to the end.
- Run
Sort names alphabetically
Bubble sort works on strings too: "Ali" < "Zara" compares character codes.
- Run
O Level Section B — a week of temperatures
Validate seven readings into an array, then report the average and the hottest day. Everything Paper 2 Section B expects in one program.
- Run
O Level Section B — cinema booking
Ticket types with CASE, quantities, a running total and a group discount.
- Run
Totalling, counting, max, min, average
The standard loop pattern with a list — and then the built-ins sum(), max(), min(), len() that do it in one line.
- Run
Validation loop — range and type checks
Keep asking until the input is a whole number between 1 and 100. try/except catches the ValueError from int().
- Run
Linear search
Walk the list until you find the target — the exam wants the loop, not list.index().
- Run
Bubble sort with a swapped flag
The classic Paper 2 / Paper 4 sort. Open the Trace tab to watch the swaps.
Also for this topic: 9 Java programs · 5 VB.NET programs in the browser compilers.
Flowchart Studio12draw-it-yourself tasks and worked flowcharts, run and checked box by box
- Open
Area of a rectangle
Input two numbers, multiply, output — the simplest complete flowchart.
- Open
Celsius to Fahrenheit
A formula in a process box; the exam's favourite two-line calculation.
- Open
Pass or fail
One decision, two output boxes, arrows that rejoin before Stop.
- Open
Largest of three numbers
Nested decisions: the chart shows why the second comparison depends on the first.
- Open
Total and average of N numbers
Totalling and counting together, then a division after the loop — the classic 2210 Q.
- Open
Total until −1 (rogue value)
A sentinel-controlled loop: read, test, add, read again.
- Open
Highest and lowest of 10 marks
Set max low and min high, then one decision each inside the loop.
- Open
Count how many passed
A counter that only increments inside a decision.
- Open
Range check with a rejection loop
Keep asking until the value is between 1 and 100 — the validation flowchart every paper wants.
- Open
Presence check
A WHILE loop that rejects an empty string.
- Open
Linear search
Search an array for a value with a found flag — 2210 §7's standard method.
- Open
One pass of a bubble sort
Compare neighbours and swap: the decision inside the loop with three process boxes.
Test yourself
Ready to check you know it?
Every round is a fresh random draw, weak cards come back until you get them right, and past-paper questions come with their mark schemes. Marks earn XP on your dashboard.
NewCS Games · 16 to play
Revise this topic by playing
Quiz battles, a daily CS word, SQL whodunnits, logic-gate puzzles and arcade — every game drills the syllabus. Solo against AskZ bots, with friends, or with your whole class. Free, no sign-up.


