#complexity
3 articles
01
·Complexity·FREE·9 min read
NP-Completeness from Scratch — Not Unsolvable, but Fast to Verify
NP does not stand for Non-Polynomial. It is the class of problems where, if someone hands you an answer, you can check it quickly. We build up P vs NP, reductions and NP-completeness from zero, then look at how all of it shows up in shift rosters and delivery routes.
02
·Complexity·★ MEMBER·8 min read
When Big-O and Your Benchmarks Disagree — Caches, Branches, and Memory Bandwidth
Two O(n) programs can differ by orders of magnitude in the real world. This article unpacks what Big-O deliberately throws away — cache hierarchies, branch prediction, and memory bandwidth — and how to reason about each.
03
·Complexity·FREE·7 min read
Complexity From Scratch — What Big-O Actually Measures
What O(n), O(n log n) and O(n²) feel like as wall-clock time. Constant factors versus growth rate, trading time against space, and the three reasons your profiler disagrees with the textbook — assuming no prior knowledge.