开发者

Program to create a hash table

开发者 https://www.devze.com 2023-01-11 14:54 出处:网络
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

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号