information repeats, which can create collisions. For example, the first three
numbers and using just the remaining four may help solve a collision problem.
150
PART 2
Understanding the Need to Sort and Search
»
Folding: Creating a unique number might be as easy as dividing the original
number into pieces, adding the pieces together, and using the result for the
hash value. For example, using the telephone number 555-1234, the hash
could begin by breaking it into pieces: 55 51 234, and then adding the result
together to obtain 340 as the number used to generate the hash.
Do'stlaringiz bilan baham: