edited by
390 views
0 votes
0 votes

What will be the time-complexity of the following ?

 

for(i=1;i<=n;i=i*2)
{
    for(j=0;j<i;j++)
    {
    count++;
    }
}

 

edited by

1 Answer

Related questions

0 votes
0 votes
1 answer
2
Çșȇ ʛấẗẻ asked Mar 14, 2023
408 views
Solve the following recurrences using recursion tree method and write the asymptotic time complexity T(n)=T(n/2)+n^2
0 votes
0 votes
3 answers
3
Nisha Bharti asked Sep 26, 2022
676 views
What is the time & space complexity of this algorithm?Main(){ for(i=n; i>10; i=i^1/4) { for(j=201; j<n^3; j=j+400) ...
0 votes
0 votes
1 answer
4
tusharb asked Feb 18, 2022
654 views
As we know the time complexity of solving the greedy knapsack algorithm depends mainly on the sorting algorithm used, Can we use counting sort as the sorting algorithm to...