What is the time complexity of Jump Search?
O(logn)
O(n)
O(sqrt(n))
O(nlogn)
Correct Answer: C — O(sqrt(n))
Explanation:
Since the size of the step is sqrt(n), the complexity is also obviously O(sqrt(n)).