retagged by
316 views

1 Answer

Related questions

0 votes
0 votes
3 answers
1
monty asked Dec 29, 2016
315 views
5 votes
5 votes
2 answers
2
Arjun asked Aug 29, 2014
2,509 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 time complexity of the ab...
10 votes
10 votes
3 answers
3
Satbir asked Jan 13, 2020
8,841 views
What is the complexity of the following code?sum=0; for(i=1;i<=n;i*=2) for(j=1;j<=n;j++) sum++;Which of the following is not a valid string?$O(n^2)$$O(n\log\ n)$$O(n)$$O(...
0 votes
0 votes
1 answer
4
Soumya Tiwari asked Oct 21, 2018
426 views
What is the total no of multiplications to be performed??D=2For i=1 to n do For j=i+1 to n do For k=j+1 to n do D=D×3