educative.io

Pls help me In example 2 quick quiz, thxxxx

In example 2 quick quiz, it said that
Suppose that in the above code the inner for loop also runs n times. What will be the time complexity for the code?

So my question is : what is the code look like and what’s the difference between the above code. l thought the above code is already run n times for inner for loop.
And could you explain how to get answer 4n+5n^2+7? Thank you for your helps. Looking to hear from you.

Hi @yan1,

Thanks for reaching out! Just to confirm, which lesson is your comment about? It looks like the comment is about the lesson Example 2: Measuring Time Complexity, however, the quiz statement in this lesson is different from what you’ve said. Please let us know so we can help with the issue.

Thank you,
Team Educative