Standard difficulty · 20 questions · 40 marks · Time: 37 minutes
Show your working for Sections B and C. Answers are on the last page — try every question first!
Algorithms with Branching: Sorting and Searching · AW-7CT-ALG-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.
| Q | Answer | Working |
|---|---|---|
| 1 | (d) branching (a condition) | — |
| 2 | (a) 8 | 63 → 68 → 34 → 17 → 22 → 11 → 16 → 8 |
| 3 | (c) 1, 16, 6, 8, 40 | 3 swaps; the largest number moves to the end |
| 4 | (a) 3 | after the pass: 1, 21, 14, 26, 32 |
| 5 | (d) 7 | each guess about halves what is left; 63 < 100 ≤ 127 |
| 6 | (c) 7 | 42 is in place 7 |
| 7 | (c) 5 | step 5 should give 28, not 27 |
| 8 | (a) B | the row ends as H R B M N |
| 9 | Choosing between different steps depending on whether a condition is true or false. | — |
| 10 | 14 | 44 → 22 → 11 → 14 |
| 11 | 3, 10, 30, 34, 39 | 2 swaps; the largest number moves to the end |
| 12 | 4 | after the pass: 24, 13, 17, 30, 32 |
| 13 | 8 | each guess about halves what is left; 127 < 200 ≤ 255 |
| 14 | 9 | 30 is in place 9 |
| 15 | 4 | step 4 should give 45, not 48 |
| 16 | 6 | undo each step from the end: 30 → 16 → 5 → 3 → 6 |
| 17 | Pass 1: 3, 7, 1, 5, 9 (3 swaps). Pass 2: 3, 1, 5, 7, 9 (2 swaps). Pass 3: 1, 3, 5, 7, 9 (1 swap). Pass 4: no swaps: sorted. | — |
| 18 | (a) 18, 23, 10, 1, 35; (b) 4 | compare 1st and 2nd, then 2nd and 3rd, and so on, swapping when the left is bigger |
| 19 | (a) 6; (b) 10 | (a) each guess about halves what is left; 31 < 60 ≤ 63; (b) 60 is in place 10 |
| 20 | (a) 22; (b) R, C, G, K, J | (a) 15 → 22 → 29 → 22 → 29 → 22; (b) carry out each instruction in order: R C G K J |