
-----------------------------------
Saad
Mon Jul 30, 2007 12:56 pm

Binary trees
-----------------------------------
Can abyone tell me when on on good time to use on on binary tree is?


Saad

-----------------------------------
wtd
Mon Jul 30, 2007 2:03 pm

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
Mon Jul 30, 2007 3:53 pm

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. :)

However, Inserting data into a binary tree is easy, fast, simple and extracting data from a binary tree is long and boring :).
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
Mon Jul 30, 2007 4:51 pm

RE:Binary trees
-----------------------------------
Inserting and extracting (searching) in a  binary tree are both O(log2 n) operations.

-----------------------------------
wensi
Sat Sep 01, 2007 10:06 am

Re: Binary trees
-----------------------------------
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
Sat Sep 01, 2007 10:40 am

Re: Binary trees
-----------------------------------
wensi, why bother reading this?

why is ur signature like this? do i know u?He's using the the worst idea ever), it's not directed at you.

-----------------------------------
Saad
Sun Sep 02, 2007 5:44 am

RE:Binary trees
-----------------------------------
Sorry about the signature thing, I forgot to remove it and was on vacation.

-----------------------------------
wensi
Sun Sep 02, 2007 8:47 pm

RE:Binary trees
-----------------------------------
its alright, its actually quite interesting :P
