The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

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)

closed with the note: duplicate
asked in Algorithms by (275 points)
closed by | 66 views

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

33,712 questions
40,255 answers
38,883 users