题目
题目
单项选择题

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

选项
A.right, 70
B.right, 50
C.right, 40
D.no rotation is needed
查看解析

查看解析

标准答案
Please login to view
思路分析
The prompt presents an invalid Red-Black Tree and asks which rotation will yield a valid RBT, specifying a right rotation at a particular node and its child. Option 1: "right, 70". A right rotation at node y with a left child 70 would require 70 to be the left child of y; however, since the given structure is invalid, rotating at that position with 70 as the pivot would not correct the specific red-black violations present. It would fail to ......Login to view full explanation

登录即可查看完整答案

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

更多留学生实用工具

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