Home Modern › Forums › ISRO › Consider the program The complexity of the program is Consider the program The complexity of the program isvoid function(int n) {int i, j, count=0;for (i=n/2; i <= n; i++)for (j = 1; j <= n; j = j*2)count++;}
(A) O(log n)
(B) O(n2)
(C) O(n2 log n)
(D) O(n log n)void function(int n) {int i, j, count=0;for (i=n/2; i <= n; i++)for (j = 1; j <= n; j = j*2)count++;}
(A) O(log n)
(B) O(n2)
(C) O(n2 log n)
(D) O(n log n)
nan