BloombergLP::bslalg::RbTreeUtil::remove

Remove node from tree and rebalance the tree.

Synopsis

Declared in <bslalg_rbtreeutil.h>

static
void
remove(
    RbTreeAnchor* tree,
    RbTreeNode* node);

Description

Remove the specified node from the specified tree, and then rebalance tree so that it again forms a valid red-black tree (see validateRbTree). The behavior is undefined unless tree is well-formed (see isWellFormed).

Parameters

NameDescription
treewell-formed tree from which node is removed
nodenode to remove from tree