Skip to content
RED SAGSkills
hard20 pts · first answer countsmathbit-manipulationhashing

Replacing % with a bit mask

A hash table maps a hash h to a bucket with `h & (size - 1)` instead of `h % size`. When is this correct for non-negative h?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions