Next: rbtree_delete, Previous: rbtree_bnd_search_node, Up: Public Routines
Determine the number of nodes in a red-black tree.
#include <rbtree/rbtree.h>unsigned long rbtree_count(RBTree rbtree);
RBTree rbtree
- the tree in question
This routine returns the number of nodes in an rbtree
.
As each tree keeps a counter of how many nodes is in it, this
is an inexpensive function to call.