All Questions
Tagged with loops complexity
3
questions
2
votes
2
answers
4k
views
Can nested loop have linear time complexity
I was going through the traditional quick sort algorithm. I had a look on the partition algorithm in a couple of places and the implementation difference was very subtle. Here are the 2 approaches:
...
-1
votes
3
answers
507
views
Time complexity of an algorithm [closed]
What is the complexity of the following loop?
for(i=1;i<n;i=2^i)
sum+=i;
3
votes
4
answers
9k
views
Complexity in nested loops
Foreword:
In this post, I will make the common confusion between O(n) and Theta(n) as complexity notations.
I will write pseudo-code to talk about algorithms, using whatever notation I find to my ...