What is the balance factor of an AVL node whose left and right subtrees have equal heights?

Options

  • A. -1
  • C. +1
  • D. More than one of the above
  • E. None of the above

Detailed Explanation

If the left and right subtrees of an AVL node have exactly the same height, their height difference is zero. Therefore, using the standard formula Balance Factor = Height(left) - Height(right), the balance factor is 0. In an AVL tree, balance factors of -1, 0, and +1 are valid. A balance factor of +2 or -2 indicates that the node has become unbalanced and requires an appropriate rotation.