Hash Table v / s C ++中的STL映射 [英] Hash Table v/s STL map in C++
本文介绍了Hash Table v / s C ++中的STL映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想学习C ++地图。只是想知道STL地图的实现。我读它使用二进制搜索树。
I am trying to learn C++ maps. Was just wondering about the implementation of STL map. I read it employs Binary search tree.
-
STL中是否有哈希表的实现?
Is there a implementation of hash table in STL?
STL地图存储键值对的确切方式是什么?
How exactly do STL map stores Key Value pairs?
推荐答案
典型的STL实现基于红黑树。 C ++ TR1提供了使用哈希表实现的std :: tr1 :: unordered_map。 Boost还提供了一个unordered_map哈希表实现。
Typical STL implementations are based on Red-Black trees. C++ TR1 provides std::tr1::unordered_map which uses a hash table implementation. Boost also provides an unordered_map hash table implementation.
C ++ 11现在有 std :: unordered_map
C++11 now has std::unordered_map
这篇关于Hash Table v / s C ++中的STL映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文