g*********s 发帖数: 1782 | 1 The way we delete a node from binary search trees (which includes red-
black
trees) now guarantees that the node requested for deletion is the node
that is
actually deleted. In the first two editions, in certain cases, some other
node
would be deleted, with its contents moving into the node passed to the
deletion
procedure. With our new way to delete nodes, if other components of a
program
maintain pointers to nodes in the tree, they will not mistakenly end up
with stale
pointers to nodes that have been deleted. |
|