Algorithm complexity
Measurement of algorithm efficiency through time complexity (execution speed) and space complexity (memory usage). Big-O notation provides upper bounds on growth rates as input size increases. Complexity analysis guides algorithm selection for practical problems. Understanding complexity is essential for writing efficient programs.
Real World
Facebook's engineers rejected an O(n²) friend-suggestion algorithm in favour of an O(n log n) approach because with 3 billion users, the quadratic version would have taken centuries to complete a single pass.
Exam Focus
When comparing algorithms, list Big-O for both time and space; examiners expect trade-off discussion for full marks.
How well did you know this?