Computer scienceAlgorithms and Data StructuresAlgorithmsPrinciples and techniquesHashing

Hash table

Inserting in a hash table 2

Report a typo

You have a hash table with 7 buckets, and you insert the numbers {0, 3, 9, 15, 16, 22} using the hash function h(x)=x % 13h(x) = x\ \%\ 13. 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.

Select one option from the list
___

Create a free account to access the full topic