The running time of the following algorithm is best described by which option?…
GATE · 2002 · CS · Question 2 subparts
The running time of the following algorithm is best described by which option? Procedure A(n): if n <= 2, return 1; otherwise return A(√n).
- A.
O(n)
- B.
O(log n)
- C.
O(log log n)
- D.
O(1)
Attempted by 204 students.
Sign up free to check your answer
Sign up freeLoading lesson…