Starting from:

$25

CS301 - Assignment 3 - Solved

Problem 1 To compute the black-height of a given node in a red-black tree (RBT) in constant time, consider augmenting the black-heights of nodes as additional attributes in the nodes of the RBT. Please explain why this augmentation does not increase the asymptotic time complexity of inserting a node into an RBT in the worst case.

Problem 2 To compute the depth of a given node in an RBT in constant time, consider augmenting the depths of nodes as additional attributes in the nodes of the RBT. Please explain by an example why this augmentation increases the asymptotic time complexity of inserting a node into an RBT in the worst case.

1

More products