Algorithms and Data Structures · Junior · Question 1 of 75
What does Big O notation describe?
- 1How many lines of code an algorithm needs
- ✓Correct answer: How the running time or memory grows as the input size grows
- 3The exact number of milliseconds an algorithm takes on a given machine
Explanation
Big O describes the growth rate: how the cost changes when n grows, ignoring constants and lower-order terms. It says nothing about absolute time on a specific machine: an O(n) loop can be slower than an O(n²) one for small inputs.