The flowchart represents an algorithm. The algorithm will terminate if −1 is entered at the List input. [Figure 10.1]
- Complete the trace table for the algorithm using this input data: 2, 77, 2, 16, 1, 35, 2, −7, 5, 18, 1, 11, 1, 12, 2, 20, −1, 18 List Value List1 List2 OUTPUT[5]
This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2021). The mark or mark type is shown in brackets.
- One mark for each correct column
- List Value List1 List2 OUTPUT
- 0 0
- 2
- 77 77
- 2
- 16 93
- 1
- 35 35
- 2
- -7 86
- 5
- Input Error
- 1
- 11 46
- 1
- 12 58
- 2
- 20 106
- -1
- List 1 = 58
- List 2 = 106
- List 2 is greatest
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →