Mark the balance factor of each node on the tree given in the below figure and state whether it is height-balanced.
The tree is as follows:
a
/ \
b c
/ \
d e
\
f
(Node 'a' is the root; 'b' and 'c' are children of 'a'; 'd' and 'e' are children of 'b'; 'f' is the right child of 'e')
GATE 1988 · Programming and Data Structures · AVL Tree · medium
Answer: Balance factors: d=0, f=0, c=0, e=-1, b=-1, a=2. The tree is NOT height-balanced because node 'a' has a balance factor of magnitude 2.