rank of node Get link Facebook X Pinterest Email Other Apps By Admin - December 28, 2010 Propose a tree based data structure to identify a node with nth rank with maximum efficiency . Get link Facebook X Pinterest Email Other Apps Comments AdminDecember 31, 2010 at 9:43 AMuse 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;ReplyDeleteRepliesReplyAdd commentLoad more... Post a Comment
use a red-black tree with size of subtree as another element in the structure of each node.
ReplyDeletesize(node) = size(node->left)+sizeof(node->right)+1;
for each node rank = size(node->left)+1;