Computers and Technology

Approximate the runtime of the following code fragment, in terms of n: Write your answer in a format such as "O(N^2)" or "O(N log N)" (without the quotes). int sum = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j += 2) { sum += 4; } } for (int k = -50; k <= -1; k++) { sum--; }

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 17:00, xo216aaliyah216xo
How can data be added to a new table in data base
Answers: 1
image
Computers and Technology, 22.06.2019 19:10, hgdthbgjnb83661
What a backup plan that you have created in a event you encounter a situation
Answers: 2
image
Computers and Technology, 23.06.2019 01:30, shelley3135
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
image
Computers and Technology, 23.06.2019 05:20, reeeeeee32
What did creator markus “notch" persson initially call his game
Answers: 1
Do you know the correct answer?
Approximate the runtime of the following code fragment, in terms of n: Write your answer in a format...

Questions in other subjects:

Konu
Mathematics, 21.01.2021 22:50
Konu
Mathematics, 21.01.2021 22:50