Archived

This topic is now archived and is closed to further replies.

Lestat3D

Binary/n-ary trees

Recommended Posts

Hi.

std::set and std::map
are associative containers, which must guarantee a maximum lookup time of O(lg n).

Now, the only way to ensure that is to use some kind of search tree.

So for what people say, most map implementations are red-black trees... red black trees is binary trees which also must satisfy the 4 Red-black properties all the time.
When the properties are satisfied, the tree will stay balanced.

So that was a bit OT, but what you need is set & map

Share this post


Link to post
Share on other sites