P
Peter Tkacz
Are there any data types within STL that implement a balanced tree?
Peter
Peter
Peter Tkacz said:Are there any data types within STL that implement a balanced tree?
Peter
map , multimap , set , mutlisetAre there any data types within STL that implement a balanced tree?
Peter
Peter said:Are there any data types within STL that implement a balanced tree?
Gianni Mariani said:There is no requirement to implement a certain algorithm but STL
templates that might do somthing similar are std::map<...> or
std::multimap<...> .
Well, the performance requirements imposed on maps, multimaps, sets and
multisets cause them to be implemented as balanced trees.
Dave said:True, but can anyone think of any known data structures other than balanced
binary trees that would meet the logarithmic time complexity requirements
imposed by the Standard? I'm really seriously asking because, as far as I
know, there are none, but I don't know that I am right on that...
In looking around a bit on this, it appears that skip lists might also be a
data structure that could be used to implement the STL associative
containers and meet the logarithmic time complexity requirements.
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.