Mathematics

Big-O Notation

A description of how an algorithm's cost grows with input size, ignoring constants.

The distinction interviewers probe: amortised versus worst case. Appending to a dynamic array is amortised O(1) but occasionally O(n) when it reallocates. Latency-sensitive trading systems often prefer a predictable O(log n) to an amortised O(1) with a bad tail - raising that unprompted is a strong signal.

Space complexity includes the recursion stack, which candidates routinely forget.

Constants matter more than people admit. At realistic sizes an O(n log n) algorithm with good cache behaviour routinely beats an O(n) one that chases pointers.

Full guide

Time and Space Complexity for Interviews

How to analyse complexity out loud, the cases people get wrong, and why constants sometimes matter more than the exponent.

Related terms

Practise this

Put it into practice

Knowing the definition is not the same as spotting where it applies under time pressure. Work the question bank free.

Start practising free

Browse the full quant interview glossary