Skip to main content
PProfileMatch
← Path

Data Structures · Hash Tables in Python: Collisions, Load Factor and a Mini Build

0 XP
  1. 1 current stop: learning
  2. 2 upcoming
  3. 3 upcoming
  4. 4 upcoming
  5. 5 upcoming

Finish after stop 5

Stop 1 of 5 · Parcel kiosk at the trailhead

Trick to keep in mind+3 XP

Load factor = guests per table: entries divided by buckets.

Divide the number of stored entries by the number of buckets. With separate chaining it can exceed 1, since a bucket just holds a longer chain, so it reads as the average chain length. For example, 10 entries in 5 buckets is 2. Tables grow before it gets large to keep lookups short.

Read it once, then a question tests whether the trick stuck.