• retagged by
1,069 views
1 1 vote
closed with the note: duplicate

int unknown(int n) {
inti, j, k = 0;
for (i = n/2; i<= n; i++)
for (j = 2; j <= n; j = j * 2)
k = k + n/2;
return k;
}

What is the returned value of the above function? (GATE CS 2013)
(a) Ѳ(n2) (b) Ѳ(n2 log n)
(c) Ѳ(n3) (d) Ѳ(n3 log n)

Position:
Show:

Related questions

0 0 votes
1 1 answer
693
693 views
Chaitanya Kale asked Nov 10, 2022
693 views
Can we write f(2$^{n/a}$) = Θ(2$^{n}$) for any integer a >0?
1 1 vote
2 2 answers
2.7k
2.7k views
Lakshman Bhaiya asked Nov 1, 2018
2,710 views
Consider the following statements:$(1)$ Any two functions $f,g$ are always comparable under big Oh,that is $f=O(g)$ or $g=O(f)$$(2)$ If $f=O(g)$ and $f=O(h)$ then $g(n)=\...
2 2 votes
1 1 answer
992
992 views
Pavan Kumar Munnam asked Aug 12, 2017
992 views
2. Fill the following blanks with the notations $O, o, \Omega, \omega$, or $\Theta$. Use $o$ if both $O$ and $o$ are applicable. Use $\omega$ if both $\Omega$ and $\omega...