Question: The time complexity of the code Data: Input value n Result: Print all pairs of numbers from 1 to n for i in range (

The time complexity of the code
Data: Input value n
Result: Print all pairs of numbers from 1 to n
for i in range (1,n+1) do
for j in range (1,log(n)+1) do
print (i, j);
end
end
Select one:
a.O(nlgn)
b.O(n2lgn)
c.O(n)
d.O(n2)
The time complexity of the code Data: Input value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!