I really didn't understand binary trees. They're just confusing to me. Also, what are binary trees used for? They didn't seem like they did anything to me. Anyone want to clear this up?
Needing Help,
SirCrono6
I really didn't understand binary trees. They're just confusing to me. Also, what are binary trees used for? They didn't seem like they did anything to me. Anyone want to clear this up?
Needing Help,
SirCrono6
Last edited by SirCrono6; 11-25-2003 at 12:04 PM.
From C to shining C++!
Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
- Bubba
IDE and Compiler - Code::Blocks with MinGW
Operating System - Windows XP Professional x64 Edition
some entropy with that sink? entropysink.com
there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka
Simply put, binary trees allow you to retrieve data faster among other benefits.
Not to toot my own horn (even though I am), or to brag (I would be lying if I said I didn't), try this. It may help you to understand a bit more.
BTW, I like your avatar.
My best code is written with the delete key.
Nice tutorial Prelude, just mind the size of your head doesn't upset the Moon's fragile orbit.
except this!
Where do the equal-to values go?The left subtree is always less in value than the parent, and the right subtree is always greater in value than the parent.
Last edited by HybridM; 11-25-2003 at 04:42 PM.
Thor's self help tip:
Maybe a neighbor is tossing leaf clippings on your lawn, looking at your woman, or harboring desires regarding your longboat. You enslave his children, set his house on fire. He shall not bother you again.
OS: Windows XP
Compiler: MSVC
>just mind the size of your head doesn't upset the Moon's fragile orbit.
As long as I make the odd mistake and somebody calls me on it there shouldn't be a problem. Getting corrected deflates my ego a great deal.
>Where do the equal-to values go?
Duplicate values are ignored. Naturally there are other solutions to the duplicates problem, but for simple trees like the ones worked with in the tutorial, there's no point to do anything more than ignore them.
My best code is written with the delete key.