Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Binary trees
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Saad




PostPosted: Mon Jul 30, 2007 12:56 pm   Post subject: Binary trees

Can abyone tell me when on on good time to use on on binary tree is?


Saad
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Mon Jul 30, 2007 2:03 pm   Post subject: RE:Binary trees

Well, a binary tree is ideally balanced, and of course it's sorted.

So I'll answer your question with a question.

Inserting data into a binary tree is ____ and extracting data from a binary tree is ____?
Ultrahex




PostPosted: Mon Jul 30, 2007 3:53 pm   Post subject: Re: Binary trees

funny thing is wtd, that i always put ruffles when people put ____s
so .... Inserting data into a binary tree is ruffles and extracting data from a binary tree is ruffles. Smile

However, Inserting data into a binary tree is easy, fast, simple and extracting data from a binary tree is long and boring Smile.
Unless I am mistaken, also the extracting data you have to look at which data you are extracting and depends on how your binary tree is setup also!

However, it is one of the many questions that has come up in Computer Science, and I am still unsure when a good time to use a Binary Tree would be, except in Graphing Information (Ex. collection of points that represent space-time, and want to insert a new point in middle) other then that I'm not sure what other times you would Actually Use in terms of Data Structure wise....

Hopefully wtd you can give a good example of when you would use a binary tree over another data structure. (I think that is what he is actually asking for)
rizzix




PostPosted: Mon Jul 30, 2007 4:51 pm   Post subject: RE:Binary trees

Inserting and extracting (searching) in a binary tree are both O(log2 n) operations.
wensi




PostPosted: Sat Sep 01, 2007 10:06 am   Post subject: Re: Binary trees

a100 @ Mon Jul 30, 2007 12:56 pm wrote:
wensi, why bother reading this?


why is ur signature like this? do i know u?

btw, all what i could think of now is that binary trees can be used for parsing arithmetic expression and used for BSP in 3D engines.
rdrake




PostPosted: Sat Sep 01, 2007 10:40 am   Post subject: Re: Binary trees

wensi @ Sat Sep 01, 2007 10:06 am wrote:
a100 @ Mon Jul 30, 2007 12:56 pm wrote:
wensi, why bother reading this?


why is ur signature like this? do i know u?
He's using the [ username ] tag (aka the worst idea ever), it's not directed at you.
Saad




PostPosted: Sun Sep 02, 2007 5:44 am   Post subject: RE:Binary trees

Sorry about the signature thing, I forgot to remove it and was on vacation.
wensi




PostPosted: Sun Sep 02, 2007 8:47 pm   Post subject: RE:Binary trees

its alright, its actually quite interesting Razz
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: