logo

Crowdly

Browser

Add to Chrome

Consider the following code fragment: public static double runner(int data[]) { ...

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

Consider the following code fragment:

public static double runner(int data[]) { 

    int N = 2000;

    int len = Math.min(data.length/10, N);

    double total = 0.0;

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

         total +=data[i];

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

                  System.out.println(j); 

        }

    }

    return total; 

}

What is the time complexity of this code?

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on online.upr.edu?

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

Browser

Add to Chrome