AVL.c
/* Given a non-empty binary search tree, return the
node with maximum key value found in that tree.
Note that the entire tree does not need to be
searched. */
Given a non-empty binary search tree, return the
node with maximum key value found in that tree.
Note that the entire tree does not need to be
searched.
Given a non - empty binary search tree return the node with maximum key value found in that tree . Note that the entire tree does not need to be searched .
struct Node * maxValueNode(struct Node* node)
{
	struct Node* current = node;
	while (current->right != NULL)
		current = current->right;
	return current;
}
struct Node * maxValueNode ( struct Node * node ) { struct Node * current = node ; while ( current -> right != NULL ) current = current -> right ; return current ; }
Given a non-empty binary search tree, return the
node with maximum key value found in that tree.
Given a non - empty binary search tree return the node with maximum key value found in that tree .
/* loop down to find the leftmost leaf */