logo

AQA A-Level Computer Science practice

A binary tree search starts at the root node with value 50. The left child is 30 and the right child is 70. The target value is 30. Which node is examined first, and what happens next?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Searching algorithms

Exam-style question

Try this first

A binary tree search starts at the root node with value 50. The left child is 30 and the right child is 70. The target value is 30. Which node is examined first, and what happens next?.

  1. A.30 is examined first, so the search moves right
  2. B.50 is examined first, then the search moves left
  3. C.70 is examined first, then the search moves left
  4. D.50 is examined first, then the search moves right

Answer and explanation

Concise answer

50 is examined first, then the search moves left

Why this is correct

A binary tree search begins at the root. Since 30 is less than 50, the search follows the left branch after examining 50.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions