Inner loop already runs n times, why suppose it?


The question says “Suppose that, in the above code, the inner for loop also runs n times.”

But the inner for loop, as is, already runs for n times:
for i in range(n):
for j in range(n):

PS: Please imagine the above snippet is indented properly :grimacing:

What am I missing here? :slight_smile:


I have no answer, just exactly the same question.

I see two loops, nested. Both run n times.

Any clarification greatly appreciated.

It was an error. The author has corrected it.

1 Like