Question 2(b)(ii) 2016 · May-June · Paper 43 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 2
Part (b)
(ii)
(ii)
Question 1
Question 43
Show text version of question
Question 2
Part (b)
(ii)
The recursive procedure X is defined as follows:
01 PROCEDURE X(Index, Item) 02 IF MyList[Index] > 0 03 THEN 04 IF MyList(Index) >= Item 05 THEN 06 MyList[Index] ← MyList[Index + 1] 07 ENDIF 08 CALL X(Index + 1, Item) 09 ENDIF 10 ENDPROCEDURE
An array MyList is used to store a sorted data set of non-zero integers. Unused cells contain zero.
1 2 3 4 5 6 7 8 9 10
MyList 3 5 8 9 13 16 27 0 0 0
Question 5
(ii)
State the purpose of procedure X when used with the array MyList.
...........................................................................................................................................
.......................................................................................................................................[1]
Question 6
Why this question appears here
98% assigned-topic match · Computational thinking and problem-solving › Recursion
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_s16_qp_43.pdf
