Q. What is the run time of the below code?
Code:
for i in range(n):
j=1
while(j<n):
print(i,j)
j*=2
β
Correct Answer: (D)
O(n*log(n))
for i in range(n):
j=1
while(j<n):
print(i,j)
j*=2
You must be Logged in to update hint/solution