Reputation: 3075
I want to read an array of integers, hash each integer and put it into an hash table and later lookup the table to search for the value. What would be the efficient way to do that in c/c++? Thanks in advance
Upvotes: 1
Views: 878
Reputation: 355079
If your compiler supports it, you can use std::unordered_set
. If your compiler doesn't support that yet, most implementations support hash_set
(which is well documented in the SGI STL documentation).
Upvotes: 4