1.

Why we need to a binary tree which is height balanced?(a) to avoid formation of skew trees(b) to save memory(c) to attain faster memory access(d) to simplify storingMy question is based upon AVL Tree topic in section Binary Trees of Data Structures & Algorithms IThe question was asked in homework.

Answer»

Right answer is (a) to avoid formation of skew trees

Easy EXPLANATION - In real world dealing with random values is often not POSSIBLE, the probability that u are dealing with NON random values(like SEQUENTIAL) leads to mostly skew trees, which leads to worst case. hence we make height balance by ROTATIONS.



Discussion

No Comment Found

Related InterviewSolutions