Which rotation is generally required to correct an LL imbalance in an AVL tree?

Options

  • A. Left rotation
  • B. Right rotation
  • C. Left-right rotation
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Right rotation

Detailed Explanation

An LL (Left-Left) imbalance occurs when a node becomes unbalanced because insertion occurs in the left subtree of its left child. The standard correction is a single right rotation. In contrast, an RR imbalance is corrected by a left rotation. LR and RL cases require double rotations. Knowing these four AVL imbalance cases is important because questions may provide a small tree and ask which rotation is required to restore balance.