mayeshanidhi mayeshanidhi
  • 27-02-2024
  • Computers and Technology
contestada

for (int i = 1; i < n; i = i*2)

---------for (int j = 0; j < i; j = j+2)

---------------Sum[i] += j * Sum[i];


What is the tight bound big-Oh time complexity in terms of n in each case? Show
all necessary steps.


(I GET IT THE OUTER LOOP IS log(n), BUT I'M CONFUSED ABOUT THE INNER AND THE TOTAL)

Respuesta :

Otras preguntas

how do you think we should celebrate hispanic heritage month in school ?
What does it mean to be a social worker?
please help i’ll give brainliest!! Step 1: Select Your Ideal Design Career Now that you have had a chance to consider various careers in design, take a moment
stktitoeykdzgzfhzfjztjsjsj​
Write the verbs in brackets. Use the zero conditional. 1- if it (rain), the streets (get) wet. 2- my mother (get) angry when I (not do) my homework everyday. 3-
Please look at the picture attached.
Predict what would happen if the composition of the atmosphere changed. How might this affect the biosphere?
You’re not allowed _______ when the red flag is flying. A. to swim B. swimming C. swim D. to be swim
AY (4,6) O (-3,-5) Domain: Range:
help pls pls asap pls pls <3