Complexity Analysis of algorithms is performed to explain how an algorithm will perform when the input _______________.
Complexity Analysis of algorithms is performed to explain how an algorithm will perform when the input _______________.
Solution
✅ Correct Option: 2
Complexity analysis studies how the time (or space) an algorithm needs grows as the input size grows. This is why it is written in asymptotic notation such as or .
Options 3 and 4: whether the input is sorted affects the best-case or worst-case behaviour of a particular algorithm, but it is not what complexity analysis is about. The analysis is about input size.
Option 1: if the input never changes, there is no growth rate to study.
Related questions:
2026: 23 May Shift 2
2026: 13 May Shift 2