4 ms·
Technically speaking, a hash is just a function that maps arbitrary data into a fixed size set of outputs. f(x) = 1 is a hash function. A catastrophically bad
by omegaworks 7y ago
Technically speaking, a hash is just a function that maps arbitrary data into a fixed size set of outputs.
f(x) = 1 is a hash function. A catastrophically bad one to use for something like a hashmap, but a hash function nonetheless.
- philwelch 7y agoAlthough if you’re implementing a hashmap from scratch, that is a very good hash function to use temporarily while building collision management.