What is/are the disadvantages of implementing tree using normal arrays?

What is/are the disadvantages of implementing tree using normal arrays?
A. difficulty in knowing children nodes of a node
B. difficult in finding the parent of a node
C. have to know the maximum number of nodes possible before creation of trees
D. difficult to implement
 
Answer: C
Explanation: The size of array is fixed in normal arrays. We need to know the number of nodes in the tree before array declaration. It is the main disadvantage of using arrays to represent binary trees.
 

Tìm kiếm

Back
Top