An empty tree is height-balanced. Anon-empty binary tree T is balanced if:
1) Left subtree of T isbalanced
2)Right subtree of T is balanced
3) The difference betweenheights of left subtree and right subtree is not more than 1.
An empty tree is height-balanced. Anon-empty binary tree T is balanced if:
1) Left subtree of T isbalanced
2)Right subtree of T is balanced
3) The difference betweenheights of left subtree and right subtree is not more than 1.