(5,16,22,45,2,10,18,30,50,12,1)
Consider the insertion of items with this set of keys, in the order given, into :
a. An initially empty (2,4) tree T’
b. An initially empty red black tree T’’
My solution :
I don't think that's right for the RBTree. I got 16 as the root, but 5 and 22 are the next level. Followed by 2, 10 under 5 ... then 18, and 45 under 22.
I don't think that's right for the RBTree. I got 16 as the root, but 5 and 22 are the next level. Followed by 2, 10 under 5 ... then 18, and 45 under 22.
ReplyDelete