question on avl trees

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
 
N

Noah Roberts

Evangelista said:
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).

For general purpose programming discussion comp.programming is quite good.

NR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top