Question DSA-CX-0061
HardWhat is the time complexity of this code?
def f(n):
if n <= 1:
return
for i in range(n):
work()
f(n // 3)
f(n // 3)
f(n // 3)
- A.
O(n log n)
- B.
O(n²)
- C.
Sign up free to see the answer and a step-by-step explanation.