chevron_leftHashing All topics

Sets

key % 5 → bucket

  1. 0
      empty
  2. 1
      empty
  3. 2
      empty
  4. 3
      empty
  5. 4
      empty

A set holds each value at most once, and answers 'have I seen this?' instantly. It's a hash map that kept the keys and threw the values away.

step 01/13

  • checking
  • collision · chained
  • placed · found

Practice

spec · json ↗