108 views

Consider the following nested representation of Binary Trees (ASD) where S and D are left and right subtrees of node A. Note that S and D may be NULL or further nested.

In this scenario, which of the following representation is a valid Binary Tree?

1. $(12(4567))$
2. $(1((234)56)7)$
3. $(1(234)(567))$
4. $(1(23 \text{NULL} )(45))$

### 1 comment

Did you reject D because It didn't have third element in (45)?

Option C is correct, you can see the tree diagram drawn above.