Home▸Algorithms & AI▸Hash Table and Collisions (2D)

Hash Table and Collisions (2D)

Interactive 2D hash table: insert keys, watch a real hash function map them to buckets, resolve collisions via chaining or linear probing, and tune table size and hash function to see the load factor and collision count change live.

Algorithms & AI2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-3d-hash-table-collision ↗ Open standalone

This 2D companion draws a hash table as a row of numbered buckets: type a key or draw a random one, and watch a real hash function — either the sum of its character codes or a polynomial rolling hash — reduce it modulo the table size into a bucket index. When two keys land on the same bucket it is a collision, resolved either by chaining a small linked list underneath the bucket or by linear probing to the next open slot; switch strategies, resize the table, or change the hash function to see how the live collision count and load factor respond.

⚙ Under the hood

Insert keys into a 2D hash table and watch a real hash function map them into buckets, resolving collisions via chaining or linear probing while load factor and hash function stay fully adjustable.

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)