题目
题目
单项选择题

RBT_RTT_11 Consider invalid Red Black Tree below. A___ rotation at node_____yields a valid red-black tree.

选项
A.left, 60
B.no rotation is needed
C.left, 40
D.left, 20
查看解析

查看解析

标准答案
Please login to view
思路分析
Question restatement: The problem asks which rotation would Fix an invalid Red-Black Tree, specifying a left rotation at a particular node labeled 40 to be performed at a node y. Option 1: left, 60. This suggests performing a left rotation at the node labeled 60. If the actual imbalance or red-black property violation occurs around a different node than 60, or if rotating at 60 would propagate the violation to another part of the tree, this choice would fail to restore the required properties. Moreover, the specific pair (left, 60) may not address the pa......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!