Home / Programming MCQs / Python MCQs / Question

M

Mr. Dubey • 51.43K Points
Coach

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
(A) O(n)
(B) O(n^2)
(C) O(log(n))
(D) O(n*log(n))

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.