1.

What is the time complexity of fun()?int fun(int n){int count = 0;for (int i = 0; i < n; i++)for (int j = i; j > 0; j--)count = count + 1;return count;}(A) Theta (n)(B) Theta (n^2)(C) Theta (n*Logn)(D) Theta (nLognLogn)

Answer»


Discussion

No Comment Found

Related InterviewSolutions