AQA GCSE Computer Science 8525 Algorithms MCQs 2027: Sorting, Searching, Pseudocode With Answers
If you know your way around arrays, lists and pseudocode but your marks do not show it, the problem is rarely knowledge — it is practice under exam conditions. AQA Paper 1 tests algorithms in a very specific way: a short program or list of numbers, a question about what happens next, and four options that all look plausible if you are rushing.
This question bank gives you 20 original multiple-choice questions written in that style, all drawn from AQA GCSE Computer Science 8525, section 3.1 (Fundamentals of algorithms): sorting, searching, pseudocode, trace tables and efficiency. Each question comes with a worked explanation, so you learn from every mistake — and from every lucky guess. Nothing here is copied from past papers or other practice sites, and no question uses code from the AQA specification's own worked examples.
Before you start: what Paper 1 actually tests
Paper 1 (Computational thinking and programming skills) is one of two papers that make up the AQA GCSE in Computer Science. It is a written exam, 2 hours long, worth 50% of the qualification — 80 marks. It is set and marked for every candidate in the same way, and in outline its practical programming statements are the same for students working in C#, Python or Visual Basic.
Paper 1 covers section 3.1 of the AQA specification — Fundamentals of algorithms. That covers representing algorithms as flowcharts and pseudocode, searching algorithms (linear and binary), sorting algorithms (bubble and merge) and algorithm efficiency — how long a program takes and how much space it needs. Note that Paper 1's own list of computational thinking statements also sits in the specification as section 3.2, and the algorithms in section 3.1 are the tested content — you do not need to know anything beyond the specification.
How to use this question bank (20 minutes)
Set a timer for 20 minutes — one minute per question, which is roughly the pace Paper 1 demands. Answer every question before you look at any explanation, and write down your answers so you cannot quietly change them. Then check the answer key and read every explanation, including those for questions you got right — most contain a tip or a shortcut you can use on the next paper.
Photo by Christina Morillo on Pexels
Quick revision: the four topics in section 3.1
Representing algorithms
An algorithm is a sequence of steps that solves a problem. AQA expects you to read, write and trace algorithms presented in three forms: pseudocode (the plain-language instructions in the AQA reference language), flowcharts (symbols on a page), and high-level language (Python, C# or Visual Basic — you only need one). Pseudocode is where most of the marks are hiding: if you can trace a WHILE loop on paper, you can answer half of Paper 1.
Two AQA conventions catch candidates out. First, in AQA pseudocode an assignment uses a left arrow (total ← 0), and comparisons use = for equals, which is different from Python's ==. Second, AQA arrays are consistently indexed from 0 in our questions, and index positions are shown as numbers[0] in every step of a trace. We use the same conventions in every question here — so if you learn them once, you will not lose marks on a symbol.
total ← 0— assignment: settotalto 0OUTPUT total— display the value oftotalWHILE condition...ENDWHILE— repeat while the condition is trueREPEAT...UNTIL condition— repeat until the condition is true (always runs at least once)FOR i ← 0 TO numbers.length - 1— loop over every position of an array of length 5
Searching: linear and binary
Linear search checks each item in turn, from the start, until it finds the target or reaches the end. It works on any list, sorted or not, but it is slow on large lists — in the worst case it checks every item. Binary search only works on a sorted list: it compares the target with the middle item, discards half the list, and repeats. It is much faster on large lists — roughly halving the search space each time — but it fails, or misleads, if the list is unsorted.
The classic exam trap is a binary search on an unsorted list: the question gives you a jumbled list and asks how many comparisons a binary search takes. If the list is not sorted, the answer is that binary search cannot be used at all — it would give a false answer. Linear search is always the right choice for unsorted data.
Sorting: bubble and merge
Bubble sort compares adjacent items and swaps them if they are in the wrong order, repeating passes through the list until no swaps are needed. Each pass pushes the largest remaining item to its final position. It is simple to write and easy to trace, which is why it appears so often in exams — but it is slow: for a list of n items, the number of comparisons grows roughly as n squared.
Merge sort splits the list in half repeatedly until each piece holds one item, then merges the pieces back together in order. It is much faster than bubble sort on long lists, and its steps are predictable — it always takes about the same time, whatever the order of the data. Merge sort needs extra memory for the temporary lists it creates, which is the cost of its speed.
The exam pattern to spot is the state of the list, not the full trace: after k passes of bubble sort, the last k items are in their final positions. After one merge-sort level, the list is divided into sorted pairs. If a question asks "after two passes", count from the end, not from the start.
Efficiency
Efficiency is about how an algorithm's time and space grow as the data grows. A linear algorithm's time grows in step with the data: twice the items, twice the time. A quadratic algorithm grows much faster: twice the items, four times the time. Sorting a list of 1,000 numbers with bubble sort takes roughly a million comparisons; merge sort does the same job in about 10,000. The exam asks you to compare two named algorithms on the same data and pick the better one — it does not ask you to calculate Big-O notation.
Sorting — Questions 1–6
Q1. A bubble sort is applied to the list [5, 2, 8, 1, 9]. After the first complete pass, what is the list?
A. [2, 5, 1, 8, 9] B. [1, 2, 5, 8, 9] C. [2, 5, 8, 1, 9] D. [5, 2, 1, 8, 9]
Answer: A — [2, 5, 1, 8, 9]. First pass: 5 and 2 swap to [2, 5, 8, 1, 9]; 5 and 8 stay; 8 and 1 swap to [2, 5, 1, 8, 9]; 8 and 9 stay. The largest value, 9, ends up in its final position at the end — that is the signature of one bubble-sort pass.
Q2. Which statement about merge sort is correct?
A. It is slower than bubble sort for lists of 10,000 items B. It uses extra memory for the temporary lists it creates while merging C. It only works on lists that are already almost sorted D. It sorts a list in a single pass
Answer: B — Merge sort needs extra memory. Splitting and merging creates temporary sub-lists, so merge sort uses more space than an in-place sort like bubble sort. It is much faster on long lists, works on any order, and always takes several passes.
Q3. A teacher has a list of 32 exam scores to sort. She needs the job done once, and she cares about speed. Which sort should she choose, and why?
A. Bubble sort — it is the simplest to code B. Merge sort — on longer lists it is much faster than bubble sort C. Linear search — it checks each item in turn D. Selection sort — it is built into Python
Answer: B — Merge sort. For a list of 32 items, merge sort is clearly the faster choice — bubble sort's comparisons grow with the square of the list length, so it would take roughly four times as long as merge sort. Linear search is not a sort at all, and selection sort is not in the 8525 specification.
Q4. After two passes of bubble sort on [7, 3, 9, 1, 5], which two values are in their final positions at the end of the list?
A. 1 and 3 B. 5 and 7 C. 7 and 9 D. 9 and 5
Answer: C — 7 and 9. After the first pass, the largest value (9) is at the end. After the second pass, the second-largest (7) sits beside it. The last two positions hold [7, 9]. Count from the end after each pass: one pass, one value settled; two passes, two values settled.
Q5. A merge sort is applied to [6, 2, 8, 4]. After the first splitting stage, what are the two sub-lists?
A. [6, 2] and [8, 4] B. [2, 6] and [4, 8] C. [6] and [2, 8, 4] D. [4, 8] and [2, 6]
Answer: A — [6, 2] and [8, 4]. Merge sort splits the list in half first — it does not sort anything yet. The first split of [6, 2, 8, 4] gives [6, 2] and [8, 4]. Merging and sorting happen afterwards.
Q6. Which of these is NOT a characteristic of bubble sort?
A. It compares adjacent pairs of items B. It can be stopped early if no swaps happen on a pass C. It splits the list in half repeatedly until each piece holds one item D. It can sort a list in ascending or descending order
Answer: C — Splitting in half is merge sort, not bubble sort. Bubble sort compares and swaps adjacent pairs; a pass with no swaps means the list is sorted. The split-and-merge pattern belongs to merge sort.
Searching — Questions 7–11
Q7. A list holds [3, 7, 11, 15, 19]. A linear search is used to find 15. How many comparisons are made?
A. 2 B. 3 C. 4 D. 5
Answer: C — 4 comparisons. Linear search checks in order: 3 (no), 7 (no), 11 (no), 15 (yes) — four comparisons. Count from the start, and remember the comparison that finds the item counts too.
Q8. A sorted list of 16 names is searched with binary search. What is the maximum number of comparisons needed to find any name?
A. 4 B. 5 C. 8 D. 16
Answer: A — 4 comparisons. Halving 16 gives 8, then 4, then 2, then 1 — four steps at most. For 16 items, binary search needs at most log₂(16) = 4 comparisons. For 32 items it would be 5, and for 1,000 items about 10.
Q9. Which search is the better choice for a list of 500 unsorted numbers, and why?
A. Binary search — it halves the list each time B. Linear search — binary search only works on a sorted list C. Bubble sort — it sorts the list first D. Merge sort — it is the fastest search
Answer: B — Linear search. Binary search needs sorted data; on an unsorted list it can return a wrong answer, because the half it discards may contain the target. Linear search works on any order. Merge sort is a sort, not a search.
Q10. A binary search is used on the sorted list [4, 9, 13, 18, 22, 31]. The target is 31. Which value is compared first?
A. 4 B. 13 C. 18 D. 31
Answer: C — 18. Binary search starts at the middle. With six items, the middle position is the third or fourth item — 13 or 18, depending on the convention; AQA takes the middle of the remaining range, so the first comparison is 18 (or 13 if it takes the lower middle — in this question the exam convention gives 18). Then it compares 31 with the upper half, and finds it after two more comparisons.
Q11. A list of 7 exam scores is not in order. A teacher wants to find the score 45. What is the minimum number of comparisons a linear search could make?
A. 1 B. 4 C. 7 D. 3
Answer: A — 1 comparison. The best case for linear search is when the target is the first item checked. The worst case is 7 (every item checked). A common mistake is to answer the worst case when the question asks for the minimum.
Pseudocode and trace tables — Questions 12–17
Photo by Christina Morillo on Pexels
Q12. Read this pseudocode:
total ← 0
FOR i ← 1 TO 4
total ← total + i
ENDFOR
OUTPUT total
What is output?
A. 4 B. 6 C. 10 D. 16
Answer: C — 10. The loop adds 1, then 2, then 3, then 4: total = 10. Tracing with a table keeps the running total visible — if you rush and add 1 + 2 + 3 you get 6, which is option B, the classic trap.
Q13. Read this pseudocode:
x ← 3
y ← 0
WHILE x > 0
y ← y + x
x ← x - 1
ENDWHILE
OUTPUT y
What is output?
A. 3 B. 6 C. 9 D. 0
Answer: B — 6. The loop adds 3, then 2, then 1: y = 6. Notice the loop stops when x reaches 0 — the x > 0 condition fails, so x = 0 is not added. Many candidates include the extra 0 and still get 6, so that mistake is harmless here — but in other trace questions it is not.
Q14. Read this pseudocode:
mark ← 65
IF mark >= 50 THEN
OUTPUT 'Pass'
ELSE
OUTPUT 'Fail'
ENDIF
What is output?
A. Fail B. Pass C. 65 D. Nothing — the program has an error
Answer: B — Pass. 65 is greater than or equal to 50, so the first branch runs. The >= symbol means "greater than or equal to" — a mark of exactly 50 would also pass. Students who misread it as "greater than" still get the same answer here, but watch for the boundary.
Q15. Read this pseudocode:
count ← 0
REPEAT
count ← count + 1
UNTIL count = 3
OUTPUT count
How many times does the loop body run?
A. 0 B. 1 C. 3 D. 4
Answer: C — 3 times. A REPEAT...UNTIL loop always runs at least once — it checks the condition after the body, not before. Here it runs for count = 1, 2, 3, then stops. This is the classic difference between WHILE (checks first) and REPEAT...UNTIL (checks after).
Q16. A trace table is drawn for a FOR loop that adds numbers to a total. Which piece of information is NOT needed to trace it?
A. The starting value of the total B. The values the loop variable takes C. The colour of the output text D. The value of the total after each pass
Answer: C — The colour of the output text. A trace table records variables: their starting values, how they change each pass, and the output. Presentation details such as colour are not part of tracing.
Q17. Which of these is the best definition of an algorithm?
A. A programming language B. A sequence of steps that solves a problem C. A type of data structure D. A flowchart symbol
Answer: B — A sequence of steps that solves a problem. An algorithm is the plan, not the language it is written in and not the diagram that shows it. AQA asks this in several forms — always pick the "sequence of steps" answer.
Efficiency — Questions 18–20
Q18. A programmer needs to sort 2,000 student records by surname. Which algorithm should she choose, and why?
A. Bubble sort — it uses no extra memory B. Merge sort — it is much faster than bubble sort on long lists C. Linear search — it is the simplest algorithm D. Binary search — it halves the list each time
Answer: B — Merge sort. For 2,000 records, merge sort is far quicker — bubble sort's comparisons grow with the square of the list, so it would take roughly 4 million comparisons. Linear and binary search are searches, not sorts.
Q19. A school sorts a class list of 25 names once a term. The list is already almost in alphabetical order. Which algorithm is the better choice?
A. Merge sort — it is always fastest B. Bubble sort — on a nearly-sorted list it finishes quickly, because few swaps are needed C. Linear search — it checks each name in turn D. Binary search — it works on sorted lists
Answer: B — Bubble sort. Bubble sort is at its best on nearly-sorted data — one pass with few or no swaps is enough. Merge sort would need the same number of steps whatever the input. This question tests whether you know that the best algorithm depends on the data.
Q20. Sorting 1,000 numbers with bubble sort takes about a million comparisons. Sorting the same 1,000 numbers with merge sort takes about 10,000 comparisons. Which statement is true?
A. Bubble sort is faster for this list B. Merge sort is 100 times faster for this list C. Both take the same time D. Merge sort is slower because it uses more memory
Answer: B — Merge sort is about 100 times faster here. A million comparisons against 10,000 is a factor of 100. The memory merge sort uses is the price of its speed — it does not make it slower. This is why the exam asks you to compare algorithms on the same data rather than memorise a ranking.
Photo by cottonbro studio on Pexels
Answer key
1 A · 2 B · 3 B · 4 C · 5 A · 6 C · 7 C · 8 A · 9 B · 10 C · 11 A · 12 C · 13 B · 14 B · 15 C · 16 C · 17 B · 18 B · 19 B · 20 B
Score guide — what your score means
- 18–20: Excellent. Move on to AQA programming MCQs — or book Paper 2.
- 14–17: On track. Read the explanations for any questions you got wrong, especially the trace questions, then retake the bank tomorrow.
- 10–13: Shaky. Of the four topics, identify your weakest — sorting, searching, pseudocode or efficiency — and work through the revision notes above before trying the bank again.
- Below 10: Start from the revision notes: learn to trace a WHILE loop and a FOR loop by hand before answering questions again.
What to revise next
- Trace one bubble sort and one merge sort by hand on the list [9, 4, 7, 2, 5] — write down the state of the list after each pass or split.
- Write out, in your own words, the difference between linear and binary search, and the one condition that must hold before you can use binary search.
- Practise writing a trace table for a WHILE loop that adds numbers 1 to 10, then check your total is 55.
- Learn the AQA conventions above — the left arrow for assignment,
=for equals, and the index starting at 0. - Next, work through our AQA programming Python MCQs, or compare the boards in GCSE Computer Science: AQA vs Edexcel vs OCR.
Frequently asked questions
Is bubble sort or merge sort faster?
Merge sort is faster on long lists — its time grows roughly as n × log(n), while bubble sort's grows as n squared. For a short, nearly-sorted list, bubble sort can win because it stops early when no swaps happen. The exam asks you to compare them on the same data, not to memorise a ranking.
Do I need to know selection sort for AQA GCSE Computer Science 8525?
No. The 8525 specification names only bubble sort and merge sort in section 3.1, and asks you to know their properties and typical applications. Knowing selection sort does no harm, but it will not be tested.
How do I trace a bubble sort in Paper 1?
Count from the end: after each pass, the largest remaining item is in its final position. Write the list down after each pass, and mark the settled items so you do not compare them again. Questions that ask "after two passes" are testing exactly that.
What is the difference between linear and binary search?
Linear search works on any list, checking items in order; binary search is much faster but only works on a sorted list. On unsorted data, binary search is wrong, not just slow — it can miss the target entirely.
What pseudocode conventions does AQA use?
AQA uses a left arrow (←) for assignment, = for equals (not Python's ==), and OUTPUT to display a value. The full guide is in the AQA pseudocode reference — we follow the same conventions in every question here.
Where can I find the full specification?
The AQA 8525 specification is on the AQA website, section 3.1 Fundamentals of algorithms — the verified facts in this article were checked against it.


