PRASHNIKAप्रश्निका
Back to the paper

Answer the following questions from the diagram of a Binary Tree given below: Write the pre-order…

Computer Science20233 marksShort answer
Answer the following questions from the diagram of a Binary Tree given below:
Figure for this question
(a)[1.0]
Write the pre-order traversal of the above tree structure.
(b)[1.0]
Name the parent of the nodes D and B.
(c)[1.0]
State the level of nodes E and F when the root is at level 0.

Answer

Answer (a)

AI
Pre-order (Root, Left, Right): A, F, D, G, B, H, E

Answer (b)

AI
Parent of D: F Parent of B: A

Answer (c)

AI
With the root A at level 0: F is at level 1 and E is at level 3.
Data structures

From ISC 2023 Computer Science Paper 1, question 11(ii).