Question 71Asked in DSSSB PGT Computer Science (Technical), 11 Jul 2021

What is balance factor of an AVL tree?

  1. A|h(TL)| ≤ 1
  2. B|h(TR)| ≤ 1
  3. C|h(TL) − h(TR)| ≤ 1
  4. D|h(TL) + h(TR)| ≤ 1
Show answerHide answer

Correct answer: (C) |h(TL) − h(TR)| ≤ 1

Explanation

In an AVL tree, the heights of the left and right subtrees of every node differ by at most 1: |h(TL) − h(TR)| ≤ 1.

From DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021

This is question 71 of DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.