A balance factor in AVL tree is used to check
2024
A balance factor in AVL tree is used to check
- A.
what rotation to make.
- B.
if all child nodes are at same level.
- C.
when the last rotation occurred.
- D.
if the tree is unbalanced.
Attempted by 320 students.
Show answer & explanation
Correct answer: D
Answer : D
Explanation
The balance factor (BalanceFactor = height(left-sutree) − height(right-sutree)) is used to check if the tree is balanced or unbalanced.