C std :: map O(log n)的插入/删除/查找时间是否为是否可以实现O(1)哈希表?
解决方法
Is the insertion/deletion/lookup time of a C++ map O(log n)?
是.
Is it possible to implement an O(1) hash table?
当然.标准库还提供了一个为std::unordered_map
.
Is the insertion/deletion/lookup time of a C++ map O(log n)?
是.
Is it possible to implement an O(1) hash table?
当然.标准库还提供了一个为std::unordered_map
.