Hash map collisions

Tap to filehover a bucket

A post-office sorting desk. A coding machine prints each letter's bucket, the hash of its name mod 8, and files it in that pigeonhole, on top of any letters already there.

Prompt

/anatomy explain how a hash map handles collisions, interactive

Install

npm install anatomy-figures

In your code

page.tsx
import { HashMap } from "anatomy-figures";

<HashMap theme="light" />

Or load this figure on its own, so the others never download:

page.tsx
import HashMap from "anatomy-figures/hash-map";

Theme it

Five themes (dark, light, paper, blueprint, sepia), or your own colours through tokens. Every token.

page.tsx
<HashMap
  theme="light"
  tokens={{
    "--anatomy-card": "#ffffff",
    "--anatomy-lit": "#e5484d",
  }}
/>

Without React

index.html
import { define } from "anatomy-figures/element/hash-map";

define();

<anatomy-hash-map theme="light"></anatomy-hash-map>
The Creation of Adam, Michelangelo, c. 1512