New: Try Voli The Bear, Fast package manager (and not only) for Windows
All topics / Data Structures, Explained

Data Structures, Explained

The handful of containers you actually use day to day - arrays/lists, maps, sets, stacks, queues, and linked lists - what each one is really good at, and how to pick the right one without overthinking it.

Download EPUB
  1. Arrays & Lists - Ordered Collections An array (or list) is an ordered row of numbered slots: jumping to any slot by its index is instant, adding to the end is cheap, but inserting in the middle means shoving everything over.
  2. Maps & Sets - Lookup by Key A map stores key → value pairs so you can fetch a value instantly by its key, no scanning required; a set is the same trick used to track a bag of unique items. Both rely on 'hashing' - a label that jumps you straight to the value.
  3. Choosing the Right One A three-question decision guide - need order? need fast lookup by key? need uniqueness? - plus a side-by-side table of what's fast vs slow per container, with Big-O introduced only as intuition (constant vs grows-with-size).
  4. Stacks, Queues & Linked Lists Two access-order variants on a list - a stack (LIFO, last in first out) and a queue (FIFO, first in first out) - plus linked lists: nodes chained by pointers instead of sitting in one contiguous row, trading fast index access for cheap insertion.