Discuss Red Black Tree and its application
Application:
Propose a tree based data structure to identify a node with nth rank with maximum efficiency
Hint:Use a red-black tree with size of subtree as another element in the structure of each node.
Application:
Propose a tree based data structure to identify a node with nth rank with maximum efficiency
Hint:Use a red-black tree with size of subtree as another element in the structure of each node.
size(node) = size(node->left)+sizeof(node->right)+1;
for each node rank = size(node->left)+1;
No comments:
Post a Comment