Page 1 of 1

Why can't the tree you just constructed be colored to form a legal red-black tree? A. It actually can be colored to form

Posted: Sun May 15, 2022 10:01 am
by answerhappygod
Why Can T The Tree You Just Constructed Be Colored To Form A Legal Red Black Tree A It Actually Can Be Colored To Form 1
Why Can T The Tree You Just Constructed Be Colored To Form A Legal Red Black Tree A It Actually Can Be Colored To Form 1 (122.53 KiB) Viewed 47 times
Why can't the tree you just constructed be colored to form a legal red-black tree? A. It actually can be colored to form a legal red-black tree if we make the shallowest leaf node double black. B. A binary search tree cannot be a red-black tree. C. Path from root to deepest node is more than twice the length of the path from root to shallowest node, so it is impossible to have equal black height even if we make as many nodes red as is allowed D. Red-black trees are balanced, and this tree is not balanced as there are leaves at different depths. A single rotation on the BST in the previous question can transform it into a BST that can be colored as a red-black tree. After this rotation, the root node is (fill in the key).