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
- Numbers Index | Target | [1] | [2] | [3] | [4] | [5] | [6] | [7] | [8] | [9] | [10] | | 2 | 3 | 7 | 11 | 15 | 17 | 19 | 23 | 0 | 0[4]
This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.
Mark scheme
Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.
- [4] One mark for each marking point
- MP1 Correct Index and Target columns
- MP2 Correct Numbers [5] column
- MP3 Correct Numbers [6] and Numbers [7] columns
- MP4 Correct Numbers [8] column and no incorrect data added to any other of columns [1, 2, 3, 4, 9, 10]
- Completed Trace Table: Index | Target | [1] | [2] | [3] | [4] | [5] | [6] | [7] | [8] | [9] | [10] ---|---|---|---|---|---|---|---|---|---|---|--- 1 | 15 | 2 | 3 | 7 | 11 | 15 | 17 | 19 | 23 | 0 | 0 2 | 15 | | | | | | | | | | | 3 | 15 | | | | | | | | | | | 4 | 15 | | | | | | | | | | | 5 | 15 | | | | | 17 | | | | | | 6 | 15 | | | | | | 19 | | | | | 7 | 15 | | | | | | | 23 | | | | 8 | 15 | | | | | | | | 0 | | | 9 | 15 | | | | | | | | | | |
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →