Possible Duplicate:
Hashtable in C++?
I was originally planning on using a C++ set for a hash-like data structure that offers O(1) lookup.
However, I realized that the complexity for lookup in sets is actually O(logn):
http://www.cplusplus.com/reference/stl/set/find/
Is there a data structure akin to a hash table in C++ that offers O(1) lookup?
In C++11 there’s
unordered_set.Look to Boost if your compiler doesn’t offer unordered_set.