Question 5(a) 2020 · October-November · Paper 22 · 25 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (a)
Question 5
Question 45
Question 56
Question 30
Question 12
Question 15
Question 45
Question 56
Question 1
Question 45
Question 1
Question 2
Question 3
Question 12
Question 15
Question 12
Question 1
Question 2
Question 3
Show text version of question
Question 5
Part (a)
Question 5
This pseudocode represents an algorithm.
REPEAT Flag 0 FOR Count 0 to 3 IF Num[Count] < Num[Count + 1] THEN Store Num[Count] Num[Count] Num[Count + 1] Num[Count + 1] Store Flag 1 ENDIF NEXT Count UNTIL Flag = 0
Part (a)
The contents of the array at the start of the algorithm are:
Num[0] Num[1] Num[2] Num[3] Num[4] 45 56 30 12 15
Complete the trace table for the algorithm using the data given in the array.
Flag Count Num[0] Num[1] Num[2] Num[3] Num[4] Store 45 56 30 12 15
Why this question appears here
98% assigned-topic match · Algorithm design and problem-solving
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 2210_w20_qp_22.pdf
