The Stack Overflow podcast is back! Listen to an interview with our new CEO.

# All Questions

Tagged with
10 questions
Filter by
Sorted by
Tagged with
1answer
59 views

### Running time of algorithm (effect of j*j in for loops) - Theta Runtime

In Theta notation what are the running times of these algorithms? Algorithm 1 for i=1..n j=1 while j*j <= i: j = j + 1 Since the outer loop ...
0answers
23 views

### Run time analysis of inner loop [duplicate]

What is the run time of the following piece of code in Big-Oh notation? The first loop runs n times in the worst case. But I am having difficulty in finding run time of nested loop which runs V / deno[...
1answer
117 views

### Exponential nested Loop Big O complexity calculation [duplicate]

Can I get a bit of help over here, I can't seem to get to a finish point with this code complexity. I have trouble with making notations, exponential ones in particular..... I spent hours with this ...
1answer
999 views

s = n while (s > 4) s = s / 2 else s = s - 1 Let $T(n) = \Theta(S(n))$ where $S(n)$ is number of while-loop runs. $S(n)=1 + S(n/2)$ if $n$ is even $S(n)=... 1answer 81 views ### Big Oh notation for a function with two inputs of linear growth I'm quite new to time-complexity analysis so I might have misunderstood some basic concepts but lets say we have the following function: ... 0answers 169 views ### Run time analysis of a program with nested for loops Problem Let's say we are given a program and we want to find an algorithm that analyses its asymptotic complexity. This program can only have two types of statements: ... 0answers 36 views ### Time complexity ($\Theta\$ ) of function [duplicate]

Let f be the function with one argument - positive integer n ...
1answer
604 views

### Complexity Analysis for a nested loop with two methods [duplicate]

Hey I am studying for my intro algorithms class final and I'm not sure if I'm understanding this question correctly (its from a sample final exam). If someone could explain this to me that would be ...
1answer
2k views

### Runtime of nested loops

What is the asymptotic runtime of fthe ollowing piece of code in terms of number of updates to S in worst case. ...
1answer
777 views

### Bubble sort complexity [duplicate]

So I have this code: ...