Computer scienceAlgorithms and Data StructuresAlgorithmsPrinciples and techniquesHashing

Hash function

Hashing an array

Report a typo

Consider the following hash function for an array of integers:

  • if the array has at least 5 elements, pick 5 of them at random and return their sum as their hash value

  • if there are fewer than 5, return the sum of all elements.

Select all the reasons why this is not a good hash function:

Select one or more options from the list
___

Create a free account to access the full topic