Algorithms
Algorithms are how you turn “a computer could do this” into “here is exactly how, and here is why it’s fast.” It is the difference between a program that works on your laptop and one that works at scale.
Correctness comes first. Before you ask whether an algorithm is fast, you ask whether it is right — an invariant that holds at every step, a base case that grounds the recursion, an argument that the loop must end.
The core skill is then reasoning about cost before you write a line of code. Asymptotic analysis lets you compare strategies on paper and predict which survives a million inputs and which falls over at a thousand.
Big-O strips away the constants and the hardware to leave the one thing that matters at scale: how the work grows as the input does. A linear pass and a quadratic one feel identical on ten items and worlds apart on ten million.
Most hard problems yield to a handful of ideas — divide & conquer, greedy choices, dynamic programming, and well-chosen data structures. Learn the ideas once and you start to recognize them everywhere.
Data structures are the other half of the story. The right one — a heap, a hash table, a balanced tree, a union-find — turns an expensive operation into a cheap one, and a sluggish program into an instant one.
And when a problem is genuinely intractable, you learn to prove it — so you stop hunting for an efficient algorithm that cannot exist, and start designing approximations that can.
This is the subject that makes you dangerous: it teaches you to find a good solution, justify it, and know when no better one is possible.