Tutorial sequence

Data Structures Under the Microscope

6of 6 published
  1. 01

    advanced / 34 min

    How Python dictionaries actually remember

    Hashes, collisions, compact entries, and the implementation choices behind Python's most important container.

    Read
  2. 02

    advanced / 32 min

    Lists are dynamic arrays, not generic sequences

    Pointers, overallocation, shifting costs, and the choices hidden behind Python list operations.

    Read
  3. 03

    advanced / 33 min

    Sets: dictionaries with different tradeoffs

    Hash tables for membership, uniqueness, algebra, and the costs sets deliberately trade away.

    Read
  4. 04

    advanced / 35 min

    Strings are Unicode storage strategies

    Code points, compact representations, allocation behavior, and the boundaries where text becomes bytes.

    Read
  5. 05

    advanced / 36 min

    Tuples, records, and the cost of shape

    Immutability, hashing, packing bytecode, shallow memory, and choosing records that communicate their shape.

    Read
  6. 06

    advanced / 31 min

    Deque, heap, and bisect: choosing the non-obvious container

    Match queues, priorities, and sorted searches to the containers that make their dominant work cheap.

    Read