2025 OCR A LEVEL Computer Science H446/02 QUESTION PAPER + MARK SCHEME, Exams of Computer science

JUNE 2025 OCR A LEVEL Computer Science H446/02 QUESTION PAPER + MARK SCHEME ATTACHED.

Typology: Exams

2025/2026

Available from 11/27/2025

SharpMind
SharpMind 🇺🇸

4

(2)

26 documents

1 / 62

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Oxford Cambridge and RSA
OCR is an exempt Charity
Turn over
Please write clearly in black ink. Do not write in the barcodes.
First name(s)
Last name
Centre number Candidate number
INSTRUCTIONS
Use black ink. You can use an HB pencil, but only for graphs and diagrams.
Write your answer to each question in the space provided. If you need extra space use
the lined page at the end of this booklet. The question numbers must be clearly shown.
Answer all the questions.
INFORMATION
The total mark for this paper is 140.
The marks for each question are shown in brackets [ ].
Quality of extended response will be assessed in questions marked with an
asterisk (*).
This document has 32 pages.
ADVICE
Read each question carefully before you start your answer.
*H44602*
You can use:
a ruler (cm/mm)
an HB pencil
Do not use:
a calculator
Wednesday 18 June 2025 – Morning
A Level Computer Science
H446/02 Algorithms and programming
Time allowed: 2 hours 30 minutes
© OCR 2025 [601/4911/5]
DC (PQ/CGW) 337417/5
*1352441785*
for more: tyrionpapers.com
2025 OCR A LEVEL Computer Science H446/02 QUESTION PAPER + MARK SCHEME
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e

Partial preview of the text

Download 2025 OCR A LEVEL Computer Science H446/02 QUESTION PAPER + MARK SCHEME and more Exams Computer science in PDF only on Docsity!

Oxford Cambridge and RSA

OCR is an exempt Charity Turn over

Please write clearly in black ink. Do not write in the barcodes.

First name(s) Last name

Centre number Candidate number

INSTRUCTIONS

  • Use black ink. You can use an HB pencil, but only for graphs and diagrams.
  • Write your answer to each question in the space provided. If you need extra space use the lined page at the end of this booklet. The question numbers must be clearly shown.
  • Answer all the questions. INFORMATION
  • The total mark for this paper is 140.
  • The marks for each question are shown in brackets [ ].
  • Quality of extended response will be assessed in questions marked with an asterisk (*).
  • This document has 32 pages. ADVICE
  • Read each question carefully before you start your answer.
  • H 4 4 6 0 2 *

You can use: • a ruler (cm/mm)

  • an HB pencil Do not use: • a calculator

Wednesday 18 June 2025 – Morning

A Level Computer Science

H446/02 Algorithms and programming

Time allowed: 2 hours 30 minutes

© OCR 2025 [601/4911/5]DC (PQ/CGW) 337417/

  • 1 3 5 2 4 4 1 7 8 5 *

© OCR 2025

Section A

1 Data in a computer program needs to be sorted. (a) (i) Describe the steps a bubble sort will take to sort items into ascending order. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [5] (ii) Darcie and Felix have both written a program that will perform a bubble sort to put these numbers into ascending order.

Darcie’s version will complete six passes. However, Felix’s version will only need to complete two passes. Explain how Felix may have made his version more efficient than Darcie’s version. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2]

© OCR 2025

(c) A third type of sorting algorithm is a quick sort. The following quick sort algorithm is made up of two functions called partition() and quickSort(). The algorithm will sort an integer array into ascending numerical order. 01 function partition(array, low, high) 02 pivot = array[high] 03 index = low - 1 04 for count = low to high- 05 if array[count] < pivot then 06 index = index + 1 07 temp = array[index] 08 array[index] = array[count] 09 array[count] = temp 10 endif 11 next count 12 temp = array[index + 1] 13 array[index + 1] = array[high] 14 array[high] = temp 15 return index + 1 16 endfunction 17 18 function quickSort(array, low, high) 19 if low < high then 20 partitionIndex = partition(array, low, high) 21 quickSort(array, low, partitionIndex - 1) 22 quickSort(array, partitionIndex + 1, high) 23 endif 24 endfunction (i) Identify which of the two functions is recursive and give all of the line numbers where recursive calls are made. Recursive function name .................................................................................................................. Recursive call line numbers ............................................................................................................. [2]

© OCR 2025 Turn over

(ii) Identify the type of iteration used in the function partition(). ..................................................................................................................................................... [1] (iii) Describe the role of the function partition() in the quick sort algorithm. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [3] (iv) The algorithm needs to be changed to sort the integer array into descending numerical order. Identify the line number that needs to be changed and write the amended line of code. Line number ................... Amended line of code ....................................................................................................................... .......................................................................................................................................................... [2] (v) The quick sort is an example of a divide-and-conquer algorithm. Describe what divide-and-conquer means. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2]

© OCR 2025 Turn over

(b) The website collects data from customers’ activities once they log on. For example, the items they view and purchase. The company that owns the website would like to use data mining to improve their website and customer experience. (i) Describe what data mining means. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [3] (ii) Explain how the company can make use of data mining to improve their website and customer experience. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2]

© OCR 2025

BLANK PAGE

DO NOT WRITE ON THIS PAGE

© OCR 2025

(b) The stack is stored using a 0-based 1-dimensional array called theStack with 20 elements. The function push() stores its parameter into the next space in the stack if it is not full. The function returns true if it is successfully stored and returns false if the stack is full. Complete the function push() using pseudocode or program code. function push(data) if pointer == ..................................................................... then return false else pointer = ..................................................................... theStack[pointer] = ..................................................................... ..................................................................... endif endfunction [4]

© OCR 2025 Turn over

(c) A pointer value of -1 indicates that the stack is empty. The function pop() returns the next element in the stack. If the stack is empty it returns "false". The function updates the pointer value when appropriate. Write the function pop() using pseudocode or program code. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [6] (d) A program is designed to reverse a set of data using the stack. The main program takes 10 characters separately as input from the user and uses the function push() to insert these into the stack. Once all 10 characters have been inserted into the stack, the program then uses the function pop() to output all 10 characters from the stack. Write the main program to achieve this using pseudocode or program code. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [5]

© OCR 2025 Turn over

© OCR 2025

5 A program is being written that allows users to travel between different planets in a virtual world. Spaceships are used to travel between planets and there are only set routes that they use. Fig. 5 shows a directed graph. The nodes represent the different planets and the edges represent the routes the spaceships can travel. The arrows on the edges show which way the spaceships can travel. For example, a spaceship can travel from planet B to planet C, but not from planet C to planet B. The value on each edge is the cost in space dollars to travel on that route. Fig. 5 H

G

F

D

E

B

A

C

(a) Explain why this graph is a visualisation of the problem. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2]

© OCR 2025

(c) The A* algorithm can also be used to find the shortest path in a graph. Describe how an A* algorithm uses heuristics to be an efficient algorithm. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2]

6 A student is writing a program in a high-level programming language. (a) The student writes the program using an Integrated Development Environment (IDE). Complete the table by identifying and describing three features of an IDE that the student can use to debug their program. Debugging feature Description

[6]

© OCR 2025 Turn over

(b) The program the student is developing includes both global and local variables. (i) Explain the difference between a global variable and a local variable. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2] (ii) Describe one drawback of using global variables in a program. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2] (iii) Describe one drawback of using local variables in a program. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2] (c) A variable can be passed as a parameter into a function by value or by reference. Describe what parameter passing by value means. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..................................................................................................................................................... [2]

© OCR 2025 Turn over

Identify the line number of any four errors and write the corrected line for each error. Error 1 Line number ................... Corrected line ................................................................................................................................... Error 2 Line number ................... Corrected line ................................................................................................................................... Error 3 Line number ................... Corrected line ................................................................................................................................... Error 4 Line number ................... Corrected line ................................................................................................................................... [4]

© OCR 2025

7 An ordered binary search tree contains the following data:

(a) Add the following data items in the given order to the binary search tree above.

[3]