Data Structures & Algorithms · Interview question

What does Big-O notation actually describe?

A strong answer

It describes the asymptotic growth rate of an algorithm's cost (time or space) as a function of input size n, how the cost scales as n gets large, keeping only the dominant term and dropping constant factors and lower-order terms. So 3n + 100 and n/2 are both O(n); n² + 5n is O(n²). It's typically an upper bound on the worst case. Crucially, it is not a measurement of wall-clock time or operation count, two O(n) algorithms can differ by 100× in real time due to constants and memory effects. Big-O answers "how does this scale," which is what lets you reason about behavior at large n without benchmarking every input size.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

Time & Space Complexity

Big-O describes how cost grows with input size, and on an MCU you also care about the constants it hides, worst-case determinism (WCET), and the space-time tradeoff.

More Time & Space Complexity questions

Browse all 472 interview questions