Note AcademyNote Academy

Computer Science (AS & A Level) · May / June 2025 · Paper 33 · Question 13

9618

As printed in the paper

The question as text

The recursive procedure Delete() is defined as follows: PROCEDURE Delete(Index, Target) IF Numbers[Index] > 0 THEN IF Numbers[Index] >= Target THEN Numbers[Index] ← Numbers[Index + 1] ENDIF Index ← Index + 1 CALL Delete(Index, Target) ENDIF ENDPROCEDURE An array Numbers is used to store a sorted data set of non-zero positive integers. Unused cells contain zero. The contents of the array at the start of the algorithm are: Numbers [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 2 3 7 11 15 17 19 23 0 0 Complete the trace table for the algorithm for the procedure call: CALL Delete(1, 15) Numbers Index Target [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 2 3 7 11 15 17 19 23 0 0 [4]

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.