What is balance factor of an AVL tree?
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.
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.
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.