E
Evangelista Sami
hi everybody
i have a question about avl trees. (I know this is not the best group
to post this question and i would appreciate if someone could redirect
me to a more appropriate group).
i want to write a function which insert an avl tree (ie, all the
elements of this one) to another one. I have made a trivial version
which add items one by one :
-----
void add_avl_tree
(avl_tree *avl,
avl_tree to_add)
{
if(to_add)
{
add_item(avl, to_add->item);
add_avl_tree(avl, to_add->right);
add_avl_tree(avl, to_add->left);
}
}
-----
can u think of any better solution?
thanks for any help
Sami Evangelista
i have a question about avl trees. (I know this is not the best group
to post this question and i would appreciate if someone could redirect
me to a more appropriate group).
i want to write a function which insert an avl tree (ie, all the
elements of this one) to another one. I have made a trivial version
which add items one by one :
-----
void add_avl_tree
(avl_tree *avl,
avl_tree to_add)
{
if(to_add)
{
add_item(avl, to_add->item);
add_avl_tree(avl, to_add->right);
add_avl_tree(avl, to_add->left);
}
}
-----
can u think of any better solution?
thanks for any help
Sami Evangelista