# Why we need to a binary tree which is height balanced?

Category: QuestionsWhy we need to a binary tree which is height balanced?
Editor">Editor Staff asked 5 months ago

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.

Editor">Editor Staff answered 5 months ago

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.

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702