Computer Science · May / June 2024 · Paper 22 · Question 9
0478
As printed in the paper
The question as text
This flowchart represents an algorithm. A FALSE B 1 IS List[B] > List[B + 1]? T List[B] START No STOP List[B] List[B + 1] List[B + 1] T A TRUE B B + 1 IS B = 5? IS A = TRUE? Yes Yes Yes No No
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
9(a)[5]
One mark for each of columns A, B and T
Two marks for columns List[1] to List[5] all entries correct or
One mark for columns List[1] to List[5] with one error
A
B
List[1] List[2] List[3] List[4] List[5]
T
15
17
20
5
9
FALSE
1
17
15
15
TRUE
2
20
15
15
TRUE
3
TRUE
4
9
5
5
5
FALSE
1
20
17
17
TRUE
2
3
4
5
FALSE
1
2
3
4
5
9(b)[2]
One mark for each point
MP1
(bubble) sort data in array
MP2
in descending order
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

