c - How to handle data structures with indices larger than 32 bits? -


i have large index of size 80-bits , corresponding data stored in data structure on need search. can use 80-bit index in hash table?? or there better alternative data structure take constant time lookup (search)?

edit:

i think question not clear.... here setup --- have millions of files produce cryptographic hash trapdoor of size 80-bits (to represent file securely) , each 80-bit trapdoor stored data in data structure hash table. since domain of 80-bit trapdoor larger range of hash table, there collisions sure. need unique <80-bit trapdoor,data> pairs stored in data structure. how can achieve using hash table? or if there other alternative ds?

edit 2 :

let's created hash table , there occurred collision when adding keys (say x & y in order) because hash function generated same index (i) keys. using collision resolution techniques (eg. double hashing), y inserted in different location j not i. understand till point. if want search based on key y, hash table return location or j? if not i, how return j (the exact desired record)? store counter(probe) number of collisions?

you should review how hash tables work.

the object want use index passed through hash function , the resulting value used find memory position should place/look data associated index value.

if need constant time lookups go hash table. sure use appropriate hash function.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -