Next: , Previous: rbtree_join, Up: Public Routines


3.1.13 rbtree_max

Determine the node with the maximum data.

Synopsis

     #include <rbtree/rbtree.h>
     
     
     
void *rbtree_max(RBTree rbtree);

Parameters

RBTree rbtree
the red-black tree to scan

Description

This routine searches the tree for the node with the maximum data, as determined by the comparison routine with which the tree was created.

Returns

It returns the node's data pointer, NULL if the tree has no data.