Time complexity of code

time complexity of naive approach can be reduced to O(N^2), then why are we doing it in O(N^3)?

@archit_18 hey archit can you please provide question link ?

@archit_18 this is because mentor trying to teach a brute force solution. you have an idea about atleast bruteforce solution. If you don’t know about previous o(N^3) approach how will you implement the optimal one.

Hey Archit,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.