C?

0 votes

0

Yes $C$ is correct. Please explain

I tried taking an input and calculating the return value but got $A$

I tried taking an input and calculating the return value but got $A$

0

for i=1 to 10k //i++

for j=n to 1// n=n/2

p++

for i=1 first full iteration for j increment p logn times// n ,n/2,n/4 ....1

so 10k * logn

so logn

for j=n to 1// n=n/2

p++

for i=1 first full iteration for j increment p logn times// n ,n/2,n/4 ....1

so 10k * logn

so logn