Why is it important that a binary tree be balanced?

Viewed 12769

Why is it important that a binary tree be balanced

5 Answers

As we know that most of the operations on Binary Search Trees proportional to height of the Tree, So it is desirable to keep height small. It ensure that search time strict to O(log(n)) of complexity.

Rather than that most of the Tree Balancing Techniques available applies more to trees which are perfectly full or close to being perfectly balanced.

At the end of the end you need the simplicity over your tree and go for best binary trees like red-black tree or avl

Related