473,473 Members | 2,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

question on avl trees

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
Nov 13 '05 #1
1 1571
Evangelista Sami wrote:
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

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Don Bruder | last post by:
A week or two ago, I asked here about porting Python to C. Got some good answers (Note 1) but now I've got another question. Actually, more a request for clarification of a topic that both the...
6
by: C++ Shark | last post by:
Hi, which stl class is good for creating search trees? I am looking for something flexible, that allows me to search for a required state (of matrices, graphs, etc.) quickly. thanks in...
2
by: SR | last post by:
Guys, I have a 40GB database being hosted on a NAS device (Network Appliance - http://www.netapp.com/). The log file for this database grows at a rate of 5GB per day. So I do a log cutting on...
10
by: Bonj | last post by:
I almost understand TSTs, to the point where I just need to know the answer to this: When making a TST (in C++) that will have as its leaf nodes words that make up SQL language and an categorising...
9
by: denis | last post by:
Hi there, I got a tough interview questions lately, and I would like to hear your opinion: An array of N chars is given Write an efficient algorithm to find all the repeating substring with a ...
90
by: John Salerno | last post by:
I'm a little confused. Why doesn't s evaluate to True in the first part, but it does in the second? Is the first statement something different? False print 'hi' hi Thanks.
13
by: At_sea_with_C | last post by:
Consider the following code: #include <stdio.h> #define SOMEVAL 1234 enum tree_types { PINE = 10, BIRCH, LARCH, OAK = 100, MAPLE, ELM, WILLOW }; void print_val(enum tree_types tree) {...
17
Ganon11
by: Ganon11 | last post by:
Hey guys, OK, taking care of this beforehand; I AM a student in a university. This IS part of my homework, and (as a moderator), I'm doing my best to follow the posting guidelines I work so hard...
17
by: a_linux_user | last post by:
I am creating a large graph object in which I add nodes whenever I need them, and I create them by 'new node' individually. I know this is slow if I am going to allocate thousands of nodes...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.