Given below are two statements: one is labelled as Assertion A and the other…
2023
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R
Assertion A: The AVL trees are more balanced as compared to Red Black trees, but they may cause more rotations during insertion and deletion
Reason R: A Red Black tree with n nodes has height that is greater than 2 log₂(n + 1) and the AVL tree with n nodes has height less than logφ(√5(n + 2)) − 2
In the light of the above statements, choose the correct answer
- A.
Both A and R are true and R is the correct explanation of A
- B.
Both A and R are true but R is not the correct explanation of A
- C.
A is true but R is false
- D.
A is false but R is true
Attempted by 174 students.
Show answer & explanation
Correct answer: C
Assertion A is correct because AVL trees maintain stricter balance than Red-Black trees, leading to more rotations during updates. Reason R is incorrect because the height of a Red-Black tree with n nodes is at most 2 log₂(n + 1), not greater. Thus, A is true and R is false.
A video solution is available for this question — log in and enroll to watch it.