logo

Crowdly

What is the Big O space complexity of this algorithm? Example: int n = 1...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What is the Big O space complexity of this algorithm?

Example:

int n = 10;

float sum = 0.0f;

for (int i = 0; i < n; i++) {

    int k = i*2 + i - n;

    sum += (float)k + 1.0f;

}

System.out.println(sum);

0%
0%
0%
More questions like this

Want instant access to all verified answers on cyberlearn.hes-so.ch?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!