←

Algorithms

From Paper 2: Computational thinking, algorithms and programming
1(a)2 marks
Define abstraction and give an example of its use in a map app.
From Paper 2: Computational thinking, algorithms and programming
1(b)2 marks
Explain how decomposition helps when designing a large program.
From Paper 2: Computational thinking, algorithms and programming
1(c)4 marks
Trace the algorithm for the input 5 and state the output.
num = input("Enter number")result = 1for i = 1 to num    if i MOD 2 == 0 then        result = result * i    endifnext iprint(result)
From Paper 2: Computational thinking, algorithms and programming
1(d)3 marks
Show the stages of a binary search for 'Fig' in [Apple, Banana, Cherry, Date, Elder, Fig, Grape].
From Paper 2: Computational thinking, algorithms and programming
1(e)3 marks
Show the list [6, 2, 9, 4] after each pass of an insertion sort.
From Paper 2: Computational thinking, algorithms and programming
1(f)3 marks
Describe how a merge sort works.
Score 0 / 17 · 0 of 6 marked

This paper is written by Plasmo in the style of the OCR GCSE Computer Science exam. It is not a past paper and is not produced or endorsed by the exam board.

Algorithms Exam Questions: OCR GCSE Computer Science | Plasmo