Algorithms & Computation
How machines search, sort, explore connected data, and sift the primes — the core algorithmic ideas, step by step.
20 articles
- 1Computer Science10 min
Logic Gates: How Computers Do Arithmetic
How on/off switches become logic gates, gates become adders, and adders turn binary digits into arithmetic — with no understanding anywhere in the machine.
- 2Computer Science10 min
Compilers: From Source Code to Silicon
How a compiler translates human-readable source into machine code through lexing, parsing, and code generation — and why the compiled-vs-interpreted split is really about implementation.
- 3Computer Science10 min
Floating-Point: Why 0.1 + 0.2 ≠ 0.3
Why 0.1 + 0.2 lands on 0.30000000000000004, how IEEE-754 packs a sign, exponent, and mantissa into 64 bits, and why float errors are deterministic, not glitches.
- 4Computer Science8 min
Binary Search
How halving the search space every step turns a million possibilities into twenty comparisons.
- 5Computer Science10 min
Recursion: Functions That Call Themselves
The base case, the call stack, and why naive recursive Fibonacci is exponential until one cache makes it linear.
- 6Computer Science9 min
Sorting Algorithms
From bubble sort to quicksort — see exactly how each algorithm works, step by step.
- 7Computer Science10 min
Hash Tables
How hashing converts a key directly into a memory location, why collisions are unavoidable, and why the O(1) everyone quotes is an average that a bad day can destroy.
- 8Computer Science10 min
Caching: The Art of Keeping the Right Things Close
Why a small fast cache in front of slow memory speeds everything up, why locality makes it work, and why eviction policy decides the hit rate.
- 9Computer Science10 min
Dynamic Programming
Why naive recursive Fibonacci takes billions of calls, how remembering answers collapses it to n, and how the same trick solves edit distance and knapsack.
- 10Computer Science8 min
Graph Traversal
How queues and stacks determine whether you explore a graph level by level or depth by depth.
- 11Mathematics8 min
Sieve of Eratosthenes
Start with every number, then cross out the non-primes. What's left is beautiful.
- 12Computer Science10 min
Error-Correcting Codes: Fixing Bits Without Asking Again
How computers repair corrupted bits on their own using built-in redundancy — from parity to Hamming codes, syndromes, and the geometry of minimum distance.
- 13Computer Science10 min
Data Compression: Saying More With Less
Why frequent symbols deserve shorter codes, how Huffman coding builds them, and the counting argument proving no lossless scheme can shrink every possible file.
- 14Computer Science10 min
Public-Key Cryptography
One-way functions let two people who have never met build a shared key in the open — and the same asymmetry that protects the key is what a quantum computer would dismantle.
- 15Computer Science10 min
How Neural Networks Learn
What a neuron actually computes, why the squashing function is the part that matters, and how backpropagation extracts every partial derivative in a single backward sweep.
- 16Computer Science10 min
Distributed Consensus
Why agreement across unreliable machines is genuinely hard, how quorum intersection and Raft's leader election solve it in practice, and what the FLP impossibility result and CAP actually say.
- 17Computer Science10 min
Concurrency: When Threads Collide
Why interleaving threads corrupt shared state, how locks enforce mutual exclusion to fix races, and how those same locks can deadlock in a circular wait.
- 18Computer Science10 min
P vs NP
Why verifying a solution and discovering one look like utterly different tasks, what NP-completeness says about that gap, and why fifty years of effort has not settled the most important open question in computing.
- 19Computer Science10 min
Finite Automata and Regular Expressions
How a regular expression compiles into a tiny memoryless machine, why that makes it fast, and why it provably cannot match balanced brackets.
- 20Computer Science10 min
The Halting Problem
Why no program can decide whether another program halts, how Turing's diagonal argument proves it, and what undecidability means for the tools that check your code.