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
+3
A:
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).
James McNellis
2010-08-13 01:40:10
A:
I see that the unordered set is more efficient than others but I'm very confused on how to use it. This might be too much to ask but could you please give me a small example. Thanks.
Sunil
2010-08-13 02:34:56