Computer scienceAlgorithms and Data StructuresAlgorithmsPrinciples and techniquesHashing

Simplistic hash functions

The modulo hash

Report a typo

Let's suppose you want to calculate the hashes of the numbers 1, 5, 9, 18, 27 using the modulo: h(x)=x % ph(x) = x\ \%\ p. You also want the hash values to be as uniform as possible, i.e. as few giving the same value as possible. Which would be the best choice of pp for this?

Select one option from the list
___

Create a free account to access the full topic