How do you make a binary tree?
Printable View
How do you make a binary tree?
http://en.wikipedia.org/wiki/Binary_tree
I think C++ has some built in types that handle the data as a binary tree, but I am not sure. Check out the STL.
>How do you make a binary tree?
With a smile on your face. :)
>I think C++ has some built in types that handle the data as a binary tree, but I am not sure.
Sets and maps are generally written as red black trees, but they don't have to be. The same time complexity that the standard requires can be achieved through other data structures (a skip list for example).
I find it amusing that even after I've been away from the cboard for a long time, the first resource I look up when I'm looking at BSTs/balancing trees is your site, Prelude.
>the first resource I look up when I'm looking at BSTs/balancing trees is your site, Prelude.
I appreciate it. That means I actually wrote something useful for once. ;)
You? Writing something useful? That's pushing the boundaries of believability, Prelude... ;)
But you just admitted it :DQuote:
Originally Posted by XSquared
I never said it was useful. Heck, for all you know, I could be using it because it reminds me exactly of what not to do when writing BSTs.
I think you have ruined Prelude's day :DQuote:
Originally Posted by XSquared
Hello?
Hi. Have a look at the link in the third post.
That's still useful, isn't it? :DQuote:
Originally Posted by XSquared
... shush, you.
My programs have to be really simple.
Why? How simple do you want? This isn't exactly a simple topic.