Bucket

noun

say it: “BUK-it” /ˈbʌkɪt/

One numbered slot in a hash table's array, chosen for a key by its hash.

What is a bucket in a hash table?

A bucket is one numbered slot in a hash table, like one hook at a coat check. The key's hash, divided by the number of buckets, leaves a remainder that picks the bucket. A bucket can hold more than one entry when keys collide.

In a sentence

  • “Maya's hash is 392, so with 10 slots her coat goes in bucket 2.”

Level: Apprentice · More Data Structures terms at this level

Updated