What is an AVL tree?

Options

  • A. a tree which is balanced and is a height balanced tree
  • B. a tree which is unbalanced and is a height balanced tree
  • C. a tree with atmost 3 children
  • D. a tree with three children

Correct Answer (Detailed Explanation is Below)

A. a tree which is balanced and is a height balanced tree

Detailed Explanation

An AVL Tree is a self-balancing Binary Search Tree (BST).

  • For every node,
    Height difference (Balance Factor) between left and right subtree
    is -1, 0, or +1

If imbalance occurs, it is fixed using rotations:

  • Left Rotation

  • Right Rotation

  • Left-Right Rotation

  • Right-Left Rotation

OOps! You are currently offline.