Past-paper question · 2015 May-June · Paper 23 · Q3(a)(iv)

Question 3(a)(iv) 2015 · May-June · Paper 23 · 2 marks

Original past-paper question for 3(A)(IV)
Original past-paper question for 3(A)(IV)
Original past-paper question for 3(A)(IV)
Reveal official mark-scheme answer Official mark-scheme answer for 3(A)(IV)Official mark-scheme answer for 3(A)(IV)

Official answer for Question 3

Part (a)

(iv)

(iv)

•

✓
Boolean expression is evaluated repeatedly // checks array contents repeatedly
✓
•
✓
when no more swaps are required // when the array is already sorted
[2]
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International AS/A Level – May/June 2015
✓
9691

Question 23

Mark scheme 9691_s15_ms_23.pdf →

Show text version of question

Question 3

Part (a)

(iv)

Meena has written the algorithm below and wants to check that it works correctly.

FOR i ← 1 TO 4 FOR j ← 1 TO 4 IF Numbers[j] > Numbers[j + 1] THEN w ← Numbers[j] Numbers[j] ← Numbers[j + 1] Numbers[j + 1] ← w ENDIF ENDFOR ENDFOR

(iv)

Describe why this algorithm is inefficient.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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 9691_s15_qp_23.pdf

Keep practising this topic