AlgoMaster Logo

Complexity Analysis Quiz: Easy

Last Updated: June 10, 2026

easy
1 min read
1. What is the time complexity of this code?
n = array length

Select one answer.

2. What is the time complexity of this code?
a, b = integer inputs

Select one answer.

3. What is the time complexity of this code?
n = input size

Select one answer.

4. What is the time complexity of this code?
n = input value

Select one answer.

5. What is the time complexity of this code?
n = array length

Select one answer.

6. What is the time complexity of this code?
n = input size

Select one answer.

7. What is the time complexity of this code?
n = input size

Select one answer.

8. What is the time complexity of this binary search?
n = length of the sorted array

Select one answer.

9. What is the time complexity of this code?
n = length of a, m = length of b

Select one answer.

10. What is the time complexity of this code?
n = length of a, m = length of b

Select one answer.

11. What is the space complexity of this code?
n = array length

Select one answer.

12. What is the time complexity of this code?
n = input size (unused by the loop bound)

Select one answer.

13. What is the time complexity of this code?
n = input size

Select one answer.

14. What is the time complexity of this code?
n = input size

Select one answer.

15. What is the time complexity of counting the digits of n?
n = input value

Select one answer.

16. What is the space complexity of this in-place array reversal?
n = array length

Select one answer.

17. What is the time complexity of this code?
n = input size

Select one answer.

18. What is the time complexity of this code?
n = input size

Select one answer.

19. What is the space complexity of this code?
n = grid dimension

Select one answer.

20. What is the worst-case time complexity of this code?
n = array length

Select one answer.