| OCR |
GCSE (9-1) Computer Science
Mark Scheme
J277/02: Unit 2.1.2 Searching Algorithms
|
| Question | Answer | Marks | Guidance |
|---|---|---|---|
| 1a | The list must be sorted / in order. | 1 |
Accept: "Alphabetical order" or "Ascending/Descending order".
|
| 1b | Because Linear Search checks every item sequentially (one by one), so order does not matter. | 1 | |
| 2 |
|
3 |
1 mark per correct row.
|
| 3a | 7 (items) | 1 |
Sam is the 7th item.
|
| 3b |
|
2 |
Must imply iterating through the whole list.
|
| 4 |
Step 2: New Range: Indices 5 to 8. Midpoint calculation: (5 + 8) / 2 = 6.5 -> 6. Value at index 6 is 22. 22 > 19, so discard right half. Step 3: New Range: Indices 5 to 5. Midpoint calculation: (5 + 5) / 2 = 5. Value at index 5 is 19. Result: Item found at index 5. |
4 |
1 mark for correct midpoint calculation at Step 2 (index 6).
1 mark for correct comparison (22 > 19) and direction change.
1 mark for correct midpoint at Step 3 (index 5).
1 mark for finding the item.
|
| 5 |
Row 2: Low: 0, High: 3, Mid: 1, Value: 5 (1) Row 3: Low: 0, High: 0, Mid: 0, Value: 2 (1) Correct Sequence (1): Correct sequence of narrowing down to the left. |
3 |
Allow Follow Through if calculation error in row 2.
Note: Logic is (0+3)/2 = 1 (int div).
|
| 6 |
|
2 | |
| 7 |
|
4 |
Accept equivalent logic (e.g.
item if consistent). |
| 8 |
Any 5 steps from:
|
5 |
Max 5 marks.
Must mention "midpoint" and the concept of "discarding" or "splitting".
|
| 9 |
|
4 |
Do not need exact log2 calculation (20), but must indicate "significantly fewer checks".
|
| 10 |
|
2 |
This tests understanding of "Best Case" scenarios.
|