BST/bst_codeschool.cpp
// finds the maximum element present in the bst
finds the maximum element present in the bst
finds the maximum element present in the bst
BstNode * max_node_bst(BstNode *p)
{
	if (p == NULL)
	{
		return NULL;
	}
	while (p->right)
	{
		p = p->right;
	}
	return p;
}
BstNode * max_node_bst ( BstNode * p ) { if ( p == NULL ) { return NULL ; } while ( p -> right ) { p = p -> right ; } return p ; }
finds the maximum element present in the bst
finds the maximum element present in the bst