Big-O notation
A way to describe how work grows with input size. Binary search is O(log n) — doubling the data adds one step.
Algorithms, data structures and how machines actually think.
A way to describe how work grows with input size. Binary search is O(log n) — doubling the data adds one step.
A function that calls itself on a smaller problem until it hits a base case.
Everything in a computer is base-2. 1011 in binary is 8 + 0 + 2 + 1 = 11.
You feel O(n²) versus O(n log n) in your hands — the gap widens as the deck grows.