Past-paper question · 2005 October-November · Paper 3 · Q6(c)(ii)

Question 6(c)(ii) 2005 · October-November · Paper 3 · 5 marks

Original past-paper question for 6(C)(II)
Original past-paper question for 6(C)(II)
Reveal official mark-scheme answer Official mark-scheme answer for 6(C)(II)

Official answer for Question 6

Part (c)

(ii)

  • Read root
  • Compare with clutch
  • Clutch<Radio therefore traverse left subtree
  • Read root (Brakes)
  • Compare with Clutch
  • Clutch>brakes, therefore traverse right subtree
  • Root empty
  • Insert Clutch

(1 per -, max 5. Completed tree worth 3)[5]

Mark scheme 9691_w05_ms_3.pdf →

Show text version of question

Question 6

Part (c)

(ii)

The details of a car part are stored in a binary tree according to this algorithm

READ VALUE NEW_PART START AT ROOT NODE WHILE NODE NOT EMPTY, DO IF NEW_PART < VALUE AT NODE THEN FOLLOW LEFT SUBTREE ELSE FOLLOW RIGHT SUBTREE ENDIF ENDWHILE INSERT NEW_PART AT NODE END

(ii)

Explain how Clutch is added to the tree in (i).

[5]
Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9691_w05_qp_3.pdf

Keep practising this topic