Computer scienceAlgorithms and Data StructuresAlgorithmsPrinciples and techniquesHashing

Load factor in hash table

Inserting in a hash table 3

Report a typo

You have a hash table with 4 buckets and you insert the numbers {0, 3, 6, 10, 14} using the identity hash function h(x)=xh(x) = x and a max load factor α=0.75\alpha = 0.75. What is the bucket at index 2?

Tip: Remember that the bucket for an item with a hash value hh is h % (#buckets)h\ \%\ (\#buckets) and buckets are indexed from 0. Do not forget to check the load factor.

Select one option from the list
___

Create a free account to access the full topic