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 storing
My question is based upon AVL Tree topic in section Binary Trees of Data Structures & Algorithms I
The question was asked in homework.
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.