Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Binary trees
Author Message
Saad

Posted: 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

wtd

Posted: 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

Posted: 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.

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

Posted: 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

Posted: 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

Posted: 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

Posted: 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

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

its alright, its actually quite interesting
Sponsor
Sponsor

 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 8 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: