Question 1
3 marksTrace linear_search([14, 5, 22, 9, 18, 3], 9). State the values inspected, the return value and why no later item is inspected.
Show solution and marking guidance
Indicative answer: It compares 14, 5, 22 and 9 in that order (1), returns index 3 (1), and stops because the item matches the target (1).