English

When there is a nested loop and also a single loop, the time complexity will be:

Advertisements
Advertisements

Question

When there is a nested loop and also a single loop, the time complexity will be:

Options

  • 1

  • N

  • N2

  • None of these

MCQ
Advertisements

Solution

N

Explanation:

The time complexity is only assessed using the nested loop when there is just one loop present.

shaalaa.com
Time Complexity of Algorithms in Python
  Is there an error in this question or solution?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×