Understanding the impact of balance on performance
Now that we know that not all binary search trees are equal in performance, we can dive deeper and try to understand the metric that can measure how good a binary search tree is performance-wise. This metric is called the balance factor.
Balance factor
The balance factor for a node is the difference between the height of its left and right subtree.
Loading Image
Balance factor for subtree rooted at node
Liking the course? Check our discounted plans to continue learning.