hashing

what is hashing how it works elaborate it?
closed account (1vRz3TCk)
http://en.wikipedia.org/wiki/Hash_function
Hashing is when you take any type of data, and assign an integer value to it. Basically you end up storing it in an array of some sort that can be accessed based on that "key", which is the integer.

A hash function is something that takes the data as a parameter, and returns the integer value that is the key. It does this by somehow using some type of formula based on the data that is inputted so that it is usually a different number based on the parameter.

Sometimes, the key may end up the same for multiple different values. This is called a collision. This can be solved by making a linked list or something like that to store all of the items that have the same key in a line.
Topic archived. No new replies allowed.