Question: why for a is it 2 ^ h - 1 - 1 and not n - 1 . n being the nb of nodes? Say
why for a is it h and not n n being the nb of nodes? Say we have our worst case full binary tree where the root has children, the right child is a leaf and the left one again has children, the right one there is also a leaf, and the left has children that are both leaves. in this case, let v be a node in the tree. for each internal node, the left subtree contains all the leaves and the rught subtree has none, or is just a leaf. If the imbalancev is absleft subtree right would it not be n as there are nodes on the right? so the upper bound would be n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
