D
Defected
Hi,
How i can create a Binary Search Tree with a class ?
thanks
How i can create a Binary Search Tree with a class ?
thanks
Defected said:How i can create a Binary Search Tree with a class ?
The wordsmiths at C++ decided that right word for "tree" was "map". So get
out your handy-dandy copy of Josuttis and go from there. Page 194.
Not really, a map is a class that allows you to map a key to a value and
have some guarantees on how fast some operations can be performed, on
most implementations a red-black tree, which is not a binary search tree.
Defected said:Hi,
How i can create a Binary Search Tree with a class ?
thanks
Defected said:How i can create a Binary Search Tree with a class ?
Alf said:* Erik Wikström:
On the contrary, a red-black tree is a binary search tree,
A map is not necessarily a class.
A red-black tree is not necessarily a search tree. It could be used to
implement a grab bag, for example.
Alf said:Go get yourself a cup of coffee, then start your change of the world's
terminology by fixing what you can fix, e.g. Wikipedia.
Jon said:Ah yes, the encyclopaedia by children for children. Anyone reaching for that
to learn about data structures (or anything else) is asking for trouble.
I'd recommend Cormen et al.
Zeppe said:You mean this one?
http://books.google.com/books?id=NL...rithms+Cormen&sig=yd0Gq55nV9OzYCM97qRrFFTYMzc
it seems like you have to edit this one as well, because it seems to agree
with wikipedia, the encyclopaedia by children for children.
osmium said:The wordsmiths at C++ decided that right word for "tree" was "map". So get
out your handy-dandy copy of Josuttis and go from there. Page 194.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.