Oxford Cambridge and RSA Examinations
AS Level Computer Science H046/02
Algorithms and problem solving 2024
, Oxford Cambridge and RSA
Monday 22 May 2023 – Afternoon
AS Level Computer Science
H046/02 Algorithms and problem solving
Time allowed: 1 hour 15 minutes
Do not use:
* 8 9 3 9 5 0 2 7 6 4 *
• a calculator
* H 0 4 6 0 2 *
Please write clearly in black ink. Do not write in the barcodes.
Centre number Candidate number
First name(s)
Last name
INSTRUCTIONS
• Use black ink.
• Write your answer to each question in the space provided. If you need extra space use
the lined pages 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 70.
• 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 16 pages.
ADVICE
• Read each question carefully before you start your answer.
© OCR 2023 [601/5030/0] OCR is an exempt Charity
DC (ST) 300308/5 Turn over
, 2
BLANK PAGE
PLEASE DO NOT WRITE ON THIS PAGE
© OCR 2023
, 3
1 A program uses a bubble sort to sort data into ascending numerical order.
The data is stored in a 0-indexed 1-dimensional array.
(a) Show each stage of a bubble sort to sort this data into ascending numerical order:
1 5 3 9 2 7
You should clearly show and label each pass in your answer.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
© OCR 2023 Turn over
AS Level Computer Science H046/02
Algorithms and problem solving 2024
, Oxford Cambridge and RSA
Monday 22 May 2023 – Afternoon
AS Level Computer Science
H046/02 Algorithms and problem solving
Time allowed: 1 hour 15 minutes
Do not use:
* 8 9 3 9 5 0 2 7 6 4 *
• a calculator
* H 0 4 6 0 2 *
Please write clearly in black ink. Do not write in the barcodes.
Centre number Candidate number
First name(s)
Last name
INSTRUCTIONS
• Use black ink.
• Write your answer to each question in the space provided. If you need extra space use
the lined pages 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 70.
• 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 16 pages.
ADVICE
• Read each question carefully before you start your answer.
© OCR 2023 [601/5030/0] OCR is an exempt Charity
DC (ST) 300308/5 Turn over
, 2
BLANK PAGE
PLEASE DO NOT WRITE ON THIS PAGE
© OCR 2023
, 3
1 A program uses a bubble sort to sort data into ascending numerical order.
The data is stored in a 0-indexed 1-dimensional array.
(a) Show each stage of a bubble sort to sort this data into ascending numerical order:
1 5 3 9 2 7
You should clearly show and label each pass in your answer.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
© OCR 2023 Turn over