Next: , Previous: rbtree_max, Up: Public Routines


3.1.14 rbtree_max_node

Determine the node with the maximum data.

Synopsis

     #include <rbtree/rbtree.h>
     
     
     
RBNode rbtree_max_node(RBTree rbtree);

Parameters

RBTree rbtree
the tree to search

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 a handle to the node if it exists, NULL if the tree is empty.