Data Structures learning guides

Choose the right way to organize information, from arrays and hash maps to trees and graphs.

Articles in Data Structures

  • Arrays vs. Linked Lists: Choosing the Right Sequence — Both store ordered data, but their memory layouts make different operations fast. Learn when each structure fits. 5 min read · 2026-10-28
  • Stacks and Queues: Two Simple Rules, Many Uses — Explore last-in-first-out and first-in-first-out structures, with real examples from browsers, scheduling, and search. 5 min read · 2026-10-27
  • Hash Maps Explained: Fast Lookups from Keys — See how hashing turns a key into a storage location, why collisions happen, and what good hash maps promise. 6 min read · 2026-10-26
  • Trees and Binary Search Trees, One Node at a Time — Understand roots, leaves, traversals, and the ordering rule that makes a balanced search tree useful. 6 min read · 2026-10-25
  • Graphs: Modeling Connections Between Things — From maps to social networks, learn graph vocabulary and compare adjacency lists with adjacency matrices. 6 min read · 2026-10-24
  • Heaps and Priority Queues: Getting the Next Best Item — Learn how a compact tree keeps its smallest or largest value ready, and why schedulers and graph algorithms rely on heaps. 6 min read · 2026-10-28
  • Dynamic Arrays — A dynamic array stores items contiguously and grows its backing storage when capacity is exhausted. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Amortized Analysis: The Cost Across Many Operations — Amortized analysis bounds a sequence of operations rather than averaging across random inputs. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Singly Linked Lists and Pointer Traversal — A singly linked list stores each value with a pointer to the next node, allowing local insertions without shifting later values. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Doubly Linked Lists: Forward and Backward Links — A doubly linked list stores both next and previous pointers so a known node can be removed or traversed in either direction. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Circular Buffers for Bounded Streams — A circular buffer reuses a fixed array by wrapping its read and write positions to the beginning. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Deques: Efficient Operations at Both Ends — A deque supports insertion and removal at both the front and back, often using a circular array or linked blocks. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Hash Collisions: Chaining and Open Addressing — A collision occurs when distinct keys map to the same hash-table slot, so a table needs a collision-resolution strategy. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Hash-Table Load Factor and Resizing — Load factor is the ratio of stored entries to table capacity and helps estimate collision pressure. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Designing Hash Functions for Data Structures — A hash function distributes keys across a table's integer range so common key patterns do not cluster. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • AVL Trees and Balance Factors — An AVL tree maintains a height difference of at most one between each node's left and right subtrees. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Red-Black Trees: Balanced Search with Color Rules — A red-black tree uses coloring invariants and rotations to keep its height logarithmic as keys are inserted or removed. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Tries for Prefix Search and Autocomplete — A trie represents keys as paths of characters, sharing common prefixes among stored strings. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Radix Trees: Compressing Paths in a Trie — A radix tree merges chains of single-child trie nodes into labeled edges to reduce pointer and node overhead. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • B-Trees and Database Page Access — A B-tree groups many sorted keys in each node so one node can fit into a disk or database page. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Union-Find: Tracking Connected Components — Disjoint-set union maintains groups under merge and connectivity-query operations using parent pointers. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Path Compression and Union by Rank — Path compression shortens parent chains during find, while union by rank attaches a shallower tree below a deeper one. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Segment Trees for Range Queries — A segment tree stores summaries over intervals, combining child intervals to answer range queries and point updates. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Fenwick Trees for Prefix Sums — A Fenwick tree stores partial sums in an array where each index covers a range determined by its least significant set bit. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Skip Lists: Probabilistic Ordered Search — A skip list adds randomized express links over a sorted linked list to reduce expected search steps. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Bloom Filters for Space-Efficient Membership Tests — A Bloom filter uses several hash functions to set bits and can answer membership queries with possible false positives. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • LRU Caches: Evicting the Least Recently Used — An LRU cache combines a key lookup table with an ordered list so reads and writes can refresh recency efficiently. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Sparse Matrices and Coordinate Storage — A sparse matrix stores only its nonzero values to avoid memory proportional to mostly empty cells. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Persistent Data Structures and Shared Versions — A persistent structure preserves older versions after updates, often by copying only the nodes on a changed path. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Rope Data Structures for Large Text Editing — A rope stores text in a balanced tree of string chunks so edits avoid repeatedly copying one huge string. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29
  • Skip-Block Lists and Ordered Range Navigation — Block-based ordered lists group neighboring values so searches skip blocks before scanning a small local range. This guide works through a concrete example and the trade-offs to remember. 2 min read · 2026-10-29