Binary tree creation
struct NODE
{
struct NODE *left;
int value;
struct NODE *right;
};
create_tree( struct NODE *curr, struct NODE *new )
{
if(new->value <= curr->value)
{
if(curr->left != NULL)
create_tree(curr->left, new);
else
curr->left = new;
}
else
{
if(curr->right != NULL)
create_tree(curr->right, new);
else
curr->right = new;
}
}