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

Name

Description

tree

well‐formed tree from which node is removed

node

node to remove from tree

Created with MrDocs