Formula for calculating 'balance factor' in avl tree?
Answers
Answered by
0
Balance factor of a node is height of left child - height of right child. So to calculate balance factor, you need heights of both children. Just modify a program to get height of the tree to also calculate balance factor at each node.
Similar questions