为什么std::map实现为红黑树?
std::map
那里有几个平衡的二叉搜索树(BST).选择红黑树的设计权衡是什么?
c++ dictionary stl binary-search-tree data-structures
我是初学者并且正在学习C++很难理解std :: map概念,因为我正在玩的代码暗示它map是一个搜索树,即std :: map对象的所有名称都有*tree作为以及评论.
map
但是阅读本材料后http://www.cprogramming.com/tutorial/stl/stlmap.html我倾向于认为性病::地图都有无关树或哈希值.
所以我很困惑 - 代码中的变量和注释对我来说,或者主题更复杂然后我认为它是:)
c++ std
c++ ×2
binary-search-tree ×1
data-structures ×1
dictionary ×1
std ×1
stl ×1