edited by
1,234 views
1 votes
1 votes

Find the complexity of below pseudocode.

temp = 1

repeat

             for i=1 to n

                          temp=temp +1;

             n=n/2;

until n<= 1

edited by

1 Answer

0 votes
0 votes
So, will it be nlogn or logn? I usually get confused in these two. If you know any trick, please let me know

Related questions

0 votes
0 votes
0 answers
2
manvi_agarwal asked Sep 10, 2018
583 views
https://gateoverflow.in/?qa=blob&qa_blobid=17275535249024428371
1 votes
1 votes
1 answer
3
0 votes
0 votes
1 answer
4
akankshadewangan24 asked Dec 2, 2017
813 views
you are given an array which contain both positive and negative integers in it and asked to design an algorithm to find maximum sum which doest contain twp consecutive nu...