0

I have confusion in checking weather the given Tree is Balance or not. To check the tree is balance or not we calculate the mod(difference of height of left subtree - height of right subtree at each node).
Lets take an example tree in figure. The difference of red node in the lecture at youtube is calculate as 2. They said height of left subtree is 1 and the right is -1. But what I have understand so far the height is left subtree is 2 and right subtree is 0

Anyone please help me to clear this confusion.
enter image description here

Addee
  • 663
  • 10
  • 21

0 Answers0