OCR A LEVEL COMPUTER SCIENCE
H446/02 ALGORITHMS CERTIFICATION
EVALUATION TEST PAPER 2026
COMPLETE QUESTIONS AND SOLUTIONS
GRADED A+
●● Describe how a leaf node is deleted from a binary search tree. [2].
Answer: • Traverse tree until the required node is found
• Set the parent node pointer to the leaf node to null
• Add the deleted node to the free storage list
●● Describe how a binary tree can be searched for a value. [4]. Answer:
• Check if the root node is equal to search value and if so...
• ... return
• If value is less than root node take left subtree
• If value is greater than root node take right subtree
• Repeat process with the subtree...
• ... until search value is found
• ... until no more branches can be travelled
●● Explain how backtracking is used in depth-first (post-order)
traversals. [2]. Answer: • When a leaf node is reached...
, • ... the traversal backtracks to the leaf's parent node
• ... backtracks to the last node with unvisited children
●● Describe how a new item is added to a linked list. [4]. Answer: •
Check space available in the free list
• Add new data item to first free space in free list
• Append
• Prepend
●● Give two reasons why reusable program components are used in
programs. [2]. Answer: • One piece of code can be used many times
• No need to write the same code multiple times
• Takes less time to code the program
• Easier error detection as fix once and it corrects in each place
• Makes it easier to maintain the program
●● Describe the key features of a recursive algorithm. [3]. Answer: •
The function calls itself
• Each recursive call will create a new copy of the values in the
function...
• ... and add all of the values of the copy the call is being made from to a
stack
• There is a base case
H446/02 ALGORITHMS CERTIFICATION
EVALUATION TEST PAPER 2026
COMPLETE QUESTIONS AND SOLUTIONS
GRADED A+
●● Describe how a leaf node is deleted from a binary search tree. [2].
Answer: • Traverse tree until the required node is found
• Set the parent node pointer to the leaf node to null
• Add the deleted node to the free storage list
●● Describe how a binary tree can be searched for a value. [4]. Answer:
• Check if the root node is equal to search value and if so...
• ... return
• If value is less than root node take left subtree
• If value is greater than root node take right subtree
• Repeat process with the subtree...
• ... until search value is found
• ... until no more branches can be travelled
●● Explain how backtracking is used in depth-first (post-order)
traversals. [2]. Answer: • When a leaf node is reached...
, • ... the traversal backtracks to the leaf's parent node
• ... backtracks to the last node with unvisited children
●● Describe how a new item is added to a linked list. [4]. Answer: •
Check space available in the free list
• Add new data item to first free space in free list
• Append
• Prepend
●● Give two reasons why reusable program components are used in
programs. [2]. Answer: • One piece of code can be used many times
• No need to write the same code multiple times
• Takes less time to code the program
• Easier error detection as fix once and it corrects in each place
• Makes it easier to maintain the program
●● Describe the key features of a recursive algorithm. [3]. Answer: •
The function calls itself
• Each recursive call will create a new copy of the values in the
function...
• ... and add all of the values of the copy the call is being made from to a
stack
• There is a base case