1.

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

Answer»


Discussion

No Comment Found

Related InterviewSolutions