1.

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 implementThis intriguing question comes from Binary Trees using Array in division Binary Trees of Data Structures & Algorithms II have been asked this question in quiz.

Answer» CORRECT option is (c) have to know the maximum number of nodes possible before creation of TREES

The explanation is: 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.


Discussion

No Comment Found

Related InterviewSolutions