Question 72Asked in DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2

Which of the following can be the valid balance factor of any node in an AVL tree?

  1. A1
  2. B2
  3. C3
  4. D4
Show answerHide answer

Correct answer: (A) 1

Explanation

An AVL tree allows each node a balance factor (left height minus right height) of only −1, 0 or +1. So 1 is valid, while 2, 3 and 4 would need a rebalancing rotation.

From DSSSB TGT Computer Science PYQ (Technical), 8 Aug 2021, Shift 2

This is question 72 of DSSSB TGT Computer Science PYQ (Technical), 8 Aug 2021, Shift 2. 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.