### Java code execution to get result in O(1)

I have a webservice from which I gets a time and price. I have saved those records in a...

### What could be the more accurate time complexity for this algorithm?

This is my program: for(m!=n){ if(m>n) m=m-n; else n=n-m; } If I take...

### Improve latency of HTTP request function in Python using Flask

In the process of using Eventbrite's API to power a website with their events, however, I am stuck...

### Big-O of a recursive function

just wondering, what's the big o of this function, let say the initial value of the parameters is...

### Time complexity for nested n/2

I know time complexity for nested loop of n is O(n^2). But If I have the nested loop of as...

### A maximum flow solution to a modified Knight travel problem

You are given an n x n chessboard with k knights (of the same color) on it. Someone has spilled...

### Big O notation of a preprocessed static data structure

From what i understand, O(n) will grow linearly in regards to the size of the input data set. I'm...

### Is it always possible to find a constant K to prove big O or big Omega?

So I have to figure out if n^(1/2) is Big Omega of log(n)^3. I am pretty sure that it is not, since...

### What is the asymptotic time-complexity (big theta) of T(n) = log(n*n!)?

I think is O(n*log(n)) but I am not sure. I tried log(n*n!) = log(n(n *n-1*n-2* ...* 1)) =...

### Sort a table in O(n) complexity

I have to sort a table (vector), the size of this table is n, and in this table there is distinct...

### Big O notation- having hard time proving it

I need to prove t(n) is O(n!) if t(n) = (n!)(n-1) this is the formula I'm working with? any...

### Undefined big omega

I have n^3/100 -100n^2 -100n +3 and I need to find big theta. Is it possible to have an...

### Finding value of c and n0 in Big-O analysis

I have this relationship (n^2 + 7n - 10) ^3 = O(n^6) I need to prove it is true. I know it is true...

### Running time Algorithm - what is epsilon in T(n)=9T(n/3)+nlogn

I am struggling to find the correct epsilon for T(n) =9T(n/3)+nlogn. For this T(n) the 1st case of...

### Run-time complexity of nested for-loops

for(a = c; a > 0; a/=2) for(b=0; b < 2*a; b++) I have reached the conclusion that this...

### I am trying to find the run time of this algorithm by counting primitive operations [closed]

for (int i = 1; i <= N; i++) { for (int j = 1; j <= Math.pow(N,1.5); j++) { i = i*2; j =...

### Time complexity for recrusive deep flatten

What is the runtime for this recursive flatten function? My guess is that it's linear; can someone...

### Big O Notation: Justifying f(n) ∈ O(n^4)?

This is a java exercise book problem. I have looked for a method to solve with no success. Let...

### Calculate the running time in Big-O notation

1 int sum=0; 2 long start = System.currentTimeMillis(); 3 for (int i = 1; i <= N; i++) { 4 for...

### How do I find this function the growth rate based on the big O notation?

How do I find this function the growth rate based on the big O notation? for(i=1; i*i<n;...

### What would be the tight asymptotic runtime (Big Theta) for these algorithms?

Question 1 public void guessWhat1(int N){ for (int i=N; i>0, i=i/2){ for (int j=0;...

### Trained LSTM model Time Complexity in terms of Big O Notation [closed]

I have a query, what will be the trained LSTM model time complexity in terms of Big O notation? If...

### The Mathematical Relationship Between Big-Oh Classes

My textbook describes the relationship as follows: There is a very nice mathematical intuition...

### O(logn) runtime of a while loop?

I saw these two examples online and I am trying to figure out the runtime for each. I have a guess...

### Simplification of complexity of a function with two arguments in terms of Big O

Let's say we have the following complexity: T(n, k) = n^2 + n + k^2 + 15*k + 123 Where we do not...

### find big oh for "for loop that has method call"

I have tried to find the big oh for this code, for(int i=0;i<n;i*=2) fun(n); where fun() is a...

### Python - Big(O) Runtime: List Comprehension & For Loop

In CTCI(Python version), the runtime of the code below is described to be O(N) # O(N) def...

### Big-O of loop that has math.pow in condition [closed]

For the following code: for(int i = 0; i < Math.pow(n, 3); i++){ ...some code...

### What is the time complexity of this 5-line Java algorithm?

This is a solution to the following problem Basically, you have a string of '-' and '+'...