Consider the following nested representation of binary trees: (X Y Z)…
GATE · 2000 · CS · Question 1 subparts
Consider the following nested representation of binary trees: (X Y Z) indicates that Y and Z are the left and right subtrees, respectively, of node X. Note that Y and Z may be NULL or further nested. Which of the following represents a valid binary tree?
- A.
(1 2 (4 5 6 7))
- B.
(1 (2 3 4) 5 6) 7)
- C.
(1 (2 3 4) (5 6 7))
- D.
(1 (2 3 NULL) (4 5))
Attempted by 348 students.
Show answer
Correct answer: C
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…