Hash Table Visualizer (string key → price)
Shows array buckets, collisions, separate chaining only when needed, and load factor with insert & lookup steps.
Insert item
If a bucket has exactly one item, it is shown directly inside the bucket. Only when 2+ items hash to the same bucket do you see a linked list.[web:194]
Lookup item
hashIndex = hash(key) % buckets. Changing bucket count resets the structure.[web:154]
Items: 0Buckets: 7Load factor α: 0.00
Load factor (α = n / m)For chaining, α can exceed 1; longer chains mean slower lookups on average.[web:171][web:177]
0~1.0 (nice average chains)[web:177]2.0
Array of buckets, collisions, and separate chaining only on demand
emptyidx 0
emptyidx 1
emptyidx 2
emptyidx 3
emptyidx 4
emptyidx 5
emptyidx 6
Bucket chosen by hash(key)
Single entry stored directly in bucket
Bucket head when chain exists
Node currently compared during lookup