Series

How Algorithms Works

Classic algorithms explained

The building blocks of computer science — sorting, searching, string matching, graph traversal, and data structures — each explained from first principles with step-by-step examples.

  1. 001
    Intermediate Levenshtein Distance

    The edit distance that powers spell checkers, DNA alignment, and fuzzy search

    11 min
  2. 002
    Beginner Binary Search

    Cut the search space in half with every comparison

    10 min
  3. 003
    Intermediate Merge Sort

    Divide, conquer, merge — the gateway to recursive thinking

    12 min
  4. 004
    Intermediate Quicksort & Partitioning

    Pick a pivot, partition, recurse — the fastest sort in practice

    11 min
  5. 005
    Intermediate Radix Sort

    Sort without comparing — process one digit at a time

    11 min
  6. 006
    Intermediate KMP & Boyer-Moore

    Pattern matching with the skip insight

    13 min
  7. 007
    Advanced Aho-Corasick

    Search for many patterns at once with a trie automaton

    14 min
  8. 008
    Advanced Suffix Arrays

    Sort every suffix, then answer substring queries in logarithmic time

    12 min
  9. 009
    Intermediate Longest Common Subsequence

    The algorithm behind diff and git diff

    14 min
  10. 010
    Intermediate Knapsack Problem

    Pack the most value into a fixed-capacity bag

    14 min
  11. 011
    Intermediate Dijkstra's Shortest Path

    The algorithm that powers every map application

    11 min
  12. 012
    Intermediate A* Search

    Dijkstra plus a heuristic — find the shortest path by looking in the right direction

    9 min
  13. 013
    Intermediate Union-Find / Disjoint Sets

    Track connected components in near-constant time

    13 min
  14. 014
    Intermediate Trie (Prefix Tree)

    The data structure behind autocomplete

    14 min
  15. 015
    Intermediate B-Trees

    The wide, shallow tree that databases and filesystems actually use

    19 min
  16. 016
    Intermediate Hash Tables & Collision Resolution

    Map keys to slots — and what happens when two keys want the same one

    15 min
  17. 017
    Intermediate Bloom Filters

    A probabilistic set — fast, compact, and only wrong in one direction

    14 min
  18. 018
    Intermediate Consistent Hashing

    Distribute keys across servers so adding or removing a node barely shuffles anything

    11 min
  19. 019
    Intermediate Quadtrees & K-D Trees

    Recursively subdivide space to find nearby points without checking every one

    16 min
  20. 020
    Intermediate Shunting Yard Algorithm

    Parse infix expressions into postfix using an operator stack

    14 min
  21. 021
    Intermediate Minimum Spanning Trees

    Connect everything at the lowest total cost

    12 min
  22. 022
    Intermediate Convex Hull

    Find the tightest boundary around a set of points

    12 min
  23. 023
    Intermediate Topological Sort

    Put things in the right order when order matters

    10 min
  24. 024
    Advanced Red-Black Trees

    Self-balancing BSTs that power your standard library

    14 min
  25. 025
    Intermediate Rabin-Karp String Search

    Rolling hashes for fast pattern matching

    12 min
  26. 026
    Intermediate Easing Functions

    The math behind smooth animations and natural motion

    12 min