I’ll be needing to use Hash Tables with different keys. One as string for the key and another as integer.
As for the integer one, how stupid it is to run a hash function on the number to generate a key?
I mean, the numbers I’ll be using as key for the Hash Table will always be different, there will be no duplicates at all. Isn’t enough for me to use the mod operator to “truncate” the value below the hash table size?
Or there’s something more to it?
It’s not stupid, it is perfectly sensible. An integer is a natural seed in a unique naming scheme. Allthough the relational zealot in me dies a little when I say things like this =D