first i was thinking of something like this:
#include<stdio.h>
#include<conio.h>
struct node
{
int data;
struct node *left,*right;
}*tree;
struct node* MAX(struct node* q)
{
struct node* temp;
while(q->right!=NULL)
{
temp=q;
q=q->right;
}
return temp;
}
cause the right child is always bigger, so i would just go straight down to the right bottom child, but not sure how to implement into my code..