Linear hashing (code by Clade, guidance by Georgios Evangelidis)

There is no directory. In round (level) L the table uses hL(k) = h(k) mod N·2L, and buckets are split one at a time in order, at the position of the next pointer, using hL+1. A key whose hL address is below next has been in a split bucket, so it is re-addressed with hL+1. A split is triggered by the chosen condition, not by which bucket overflowed; overflowing buckets use chained overflow pages until their turn comes.

Keys or ranges, e.g. 5, 8, 10-30, 0-100 step 5
On delete
Table
History
Level 0 Next 0 Buckets 1 Overflow pages 0 Keys 0 Load factor 0%

Operation log

    Reading the diagram

    Bucket addressed with hL+1: already split this round, or created by a split
    Bucket still addressed with hL: not split yet this round
    Overflow page in the bucket's chain
    Page read by the current operation
    Key found

    Under each key are the last bits of h(k). The coloured ones are the bits the bucket's hash function looks at, so every key in a bucket agrees on them. The dashed line marks where the buckets created in this round begin.

    Hashing keeps no key order, so a range can only be answered by looking up each value, or by scanning every bucket.