I'm trying to understand something that feels pretty basic but I cannot wrap my head around
we have a key value, character, string, whatever
, and we want to send it to our hashing function
, which gives some index.
My question is, is the result of the hashing function
the value
in a key-value pair ?
Or is the value separate from the result of the hashing function?
A hash function is any function that can be used to map data of arbitrary size to fixed-size values. The values returned by a hash function are called hash values, hash codes, digests, or simply hashes. The values are usually used to index a fixed-size table called a hash table.
https://en.wikipedia.org/wiki/Hash_function
So, you provide an input, which is presumably the key and get the result of the hashing function, which is the hash.
Here's a picture taken from wikipedia