What is the time complexity of the following segment of code assuming that the function temp takes time O(n)?
...
...
x = n
y = n
while y > 1:
print(x)
temp(x)
y = y / 2
x = x – 1
temp(x)
…
…
Get Answers For Free
Most questions answered within 1 hours.