edited by
173 views
0 votes
0 votes

What is the time complexity?

i=n;
while(i>0)
{
    k=1;
    for(j=1;j<=n;j+=k)
    k++;
    i=i/2;
}

a) O(n2)

b) O(n logn)

c) O(log2n)

d) O(logn n1/2

edited by

Please log in or register to answer this question.

Related questions

1 votes
1 votes
0 answers
1
Psnjit asked Jan 29, 2019
336 views
Time complexity of Prim's algorithm for computing minimum cost spanning tree for a complete graph with n vertices and e edges using Heap data structure is-1. (n+e)*log^2n...
0 votes
0 votes
1 answer
2
0 votes
0 votes
0 answers
3
0 votes
0 votes
2 answers
4