Question 4(b)(iv) 2019 · May-June · Paper 42 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 4
Part (b)
(iv)
Question 1
Show text version of question
Question 4
Part (b)
(iv)
The following is an example of a sorting algorithm. It sorts the data in the array ArrayData.
01 TempValue "" 02 REPEAT 03 Sorted TRUE 04 FOR Count 0 TO 4 05 IF ArrayData[Count] > ArrayData[Count + 1] 06 THEN 07 TempValue ArrayData[Count + 1] 08 ArrayData[Count + 1] ArrayData[Count] 09 ArrayData[Count] TempValue 10 Sorted FALSE 11 ENDIF 12 ENDFOR 13 UNTIL Sorted = TRUE
(iv)
Identify another sorting algorithm.
.....................................................................................................................................
Question 20
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series.
Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.
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 9608_s19_qp_42.pdf
