C++0x is introducing unordered_set
which is available in boost
and many other places. What I understand is that unordered_set
is hash table with O(1)
lookup complexity. On the other hand, set
is nothing but a tree with log(n)
lookup complexity. Why on earth would anyone use set
instead of unordered_set
? i.e is there a need for set
anymore?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…