2. consider a RBT (red-black tree) that stores letters. Perform the following: 2.a Insert letters of the word COMPUTERS into an empty alphabetic RBT. Draw the final tree. 2.b Is the following RBT...


2.<br>consider a RBT (red-black tree) that stores letters. Perform the<br>following:<br>2.a Insert letters of the word COMPUTERS into an empty alphabetic RBT. Draw<br>the final tree.<br>2.b Is the following RBT valid? If not, convert it into a proper RBT by swapping<br>the red and black colors (parent-child), and performing rotations (left or right).<br>Remember that root of RBT is always black. Aim to do it in minimum number of<br>steps. Draw the resulting tree, list all your steps.<br>R<br>A<br>E<br>H<br>м<br>2. c Iteratively remove letters S, C, and H from the tree you obtained in 2.b after<br>recoloring. Draw resulting trees after every deletion, explain how you performed<br>the deletions and recoloring.<br>

Extracted text: 2. consider a RBT (red-black tree) that stores letters. Perform the following: 2.a Insert letters of the word COMPUTERS into an empty alphabetic RBT. Draw the final tree. 2.b Is the following RBT valid? If not, convert it into a proper RBT by swapping the red and black colors (parent-child), and performing rotations (left or right). Remember that root of RBT is always black. Aim to do it in minimum number of steps. Draw the resulting tree, list all your steps. R A E H м 2. c Iteratively remove letters S, C, and H from the tree you obtained in 2.b after recoloring. Draw resulting trees after every deletion, explain how you performed the deletions and recoloring.

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here