• retagged by
851 views
1 1 vote
A binary search algorithm is implemented using recurrsion

then what is the space and time complexity?

1 Answer

Position:
Show:

Related questions

1 1 vote
1 1 answer
2.9k
2.9k views
Aditya Bahuguna asked Jan 7, 2018
2,921 views
The binary search algorithm is implemented using recursion. Then the space complexity is$\mathrm{O}(1)$$\mathrm{O}(\mathrm{n})$$\mathrm{O}(\log \mathrm{n})$$O(n \log n)$
0 0 votes
2 2 answers
1.5k
1.5k views
$ourav asked May 20, 2016
1,463 views
Consider the following pseudo code written in C style:bool fun(int arr[],int n,int X) { if(X == 0) return true; if(n == 0 && X !=0) return false; if(arr[n-1]*arr[n-1] X)...
69 69 votes
6 answers 6 answers
27.9k
27.9k views
Kathleen asked Sep 22, 2014
27,933 views
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } }The space complexity of the a...
0 0 votes
0 0 answers
421
421 views
Misbah Ghaya asked Aug 17, 2022
421 views
Please list out the best free available video playlist for Asymptotic Worst-Case Time and Space Complexity from Algorithm as an answer here (only one playlist per answer)...