Past-paper question · 2016 May-June · Paper 42 · Q2(b)(ii)

Question 2(b)(ii) 2016 · May-June · Paper 42 · 1 mark

Original past-paper question for 2(B)(II)
Original past-paper question for 2(B)(II)
Original past-paper question for 2(B)(II)
Original past-paper question for 2(B)(II)
Reveal official mark-scheme answer Official mark-scheme answer for 2(B)(II)

Official answer for Question 2

Part (b)

(ii)

(ii)

✓
Any one from:

Question 1

✓
Deletes/removes parameter value/ Item (from the array MyList)
✓
// Deletes the first entry (in MyList) that equals or is bigger than Item
✓
Overwrites Item by moving subsequent items up/down/across/left R right
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International A Level – May/June 2016
✓
9608

Question 42

✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s16_ms_42.pdf →

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

Topic relevance

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_42.pdf

Keep practising this topic