educative.io

Question regarding solution time complexity

Since n^2 is the dominant term, why isn’t the time complexity simply O(n^2)?

Hey @Rob_Moore

Thank you for bringing up your question about the time complexity of this solution. I have reviewed the material and agree that the dominant term in the equation is O(n^2). As a result, we have updated the statement in the course to reflect that the total time complexity can be simplified to O(n^2).

Happy Learning!