how to describe a binary search tree?
how to describe a binary search tree?
Ooooh, I was going to do my www.googleityourself.com thing, but actually in this case it's more of a www.whydon'tyousearchwikipedia.com
Properties of a BST.
QuantumPete
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
on the right is bigger then root
on the left its smaller then root
thats it?
Ok, let me quote directly from the page then:
I should add to that definition that each node has at most 2 children.In computer science, a binary search tree (BST) is a binary tree data structure which has the following properties:
* each node (item in the tree) has a value;
* a total order (linear order) is defined on these values;
* the left subtree of a node contains only values less than the node's value;
* the right subtree of a node contains only values greater than or equal to the node's value.
QuantumPete
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
> I should add to that definition that each node has at most 2 children.
It's a given, but it couldn't hurt
thanks