A level 2
OCR
Oxford Cambridge and RSA
Monday 19 June 2023 – Morning
A Level Computer Science
H446/02 Algorithms and programming
Time allowed: 2 hours 30 minutes
You can use:
a ruler (cm/mm)
an HB pencil
Do not use:
a calculator
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. 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 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 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.
[601/4911/5] DC Turn over
© OCR 2023 (ST/SW) 312345/4
,1 A tree is one example of a data structure.
(a) (i) Give two characteristics of a tree data structure.
1 ........................................................................................................................
................
...........................................................................................................................
................
2 ........................................................................................................................
................
...........................................................................................................................
................
[2]
(ii) The following data is entered into a binary search tree.
22 13 5 36 55 14 8
Draw the binary search tree when the given data is entered in the order
given.
,[4]
, (iii) Describe how a leaf node is deleted from a binary search tree.
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
.................................................................................................................................
..... [2]
(iv) Describe how a binary search tree can be searched for a value.
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
.................................................................................................................................
..... [4]
OCR
Oxford Cambridge and RSA
Monday 19 June 2023 – Morning
A Level Computer Science
H446/02 Algorithms and programming
Time allowed: 2 hours 30 minutes
You can use:
a ruler (cm/mm)
an HB pencil
Do not use:
a calculator
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. 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 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 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.
[601/4911/5] DC Turn over
© OCR 2023 (ST/SW) 312345/4
,1 A tree is one example of a data structure.
(a) (i) Give two characteristics of a tree data structure.
1 ........................................................................................................................
................
...........................................................................................................................
................
2 ........................................................................................................................
................
...........................................................................................................................
................
[2]
(ii) The following data is entered into a binary search tree.
22 13 5 36 55 14 8
Draw the binary search tree when the given data is entered in the order
given.
,[4]
, (iii) Describe how a leaf node is deleted from a binary search tree.
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
.................................................................................................................................
..... [2]
(iv) Describe how a binary search tree can be searched for a value.
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
...........................................................................................................................
................
.................................................................................................................................
..... [4]