[Solved] What is the minimum possible time complexity to find the number of steps to reach the end of an array?

What is the minimum possible time complexity to find the number of steps to reach the end of an array?

a) O(n)
b) O(n2)
c) O(n3/2)
d) O(1)

Answer: a
Explanation: The minimum possible time complexity to reach the end of an array is O(n). So a linear time complexity is possible.

Comments