Question: When the C + + RedBlackTree's TryCase 4 ( ) function returns true, the number of black nodes on the path from the root to

When the C++ RedBlackTree's TryCase4() function returns true, the number of black nodes on the path from the root to node has _____.
bool TryCase4(RBTNode* node, RBTNode* sibling){ if (node->parent->IsRed() && sibling->AreBothChildrenBlack()){ node->parent->color = RBTNode::BLACKCOLOR; sibling->color = RBTNode::REDCOLOR; return true; } return false; // not case 4}
Group of answer choices
decreased by 1
decreased by 2
increased by 1
increased by 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!