C++ 0x正在引入unordered_set,可以在boost许多其他地方使用.我理解的是unordered_set具有O(1)查找复杂性的哈希表.另一方面,set只是具有log(n)查找复杂性的树.为什么人们会使用set而不是unordered_set?即是否需要set了?
unordered_set
boost
O(1)
set
log(n)
c++ algorithm data-structures c++11
algorithm ×1
c++ ×1
c++11 ×1
data-structures ×1