Lesson 062

Algorithm Efficiency

Big O Notation

1:00

How to measure and compare algorithms by how their operation count grows with input size, using Big O notation and the five common complexity classes.

By the end, you can

  • Explain why operation counts, not wall-clock seconds, define algorithmic efficiency.
  • Rank the five common complexity classes from slowest-growing to fastest-growing.
  • Count the operations in a simple loop or nested loop and identify its Big O class.
  • Describe what O(1), O(log n), O(n), O(n log n), and O(n²) each mean in plain terms.
  • Apply the two simplification rules to reduce a raw operation count to its Big O class.
  • Distinguish best-case, worst-case, and average-case complexity and explain which one Big O typically states.
  • Explain that Big O measures both time and space complexity, and that one can be traded for the other.
Up next in Recursion, Paradigms & Algorithm Analysis
Questions or feedback?