Program to create a hash table
I want to read an array of integers, hash each integer and put it into an hash table and later lookup th开发者_如何学Ce table to search for the value. What would be the efficient way to do that in c/c++? Thanks in advance
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).
精彩评论