I am unable to pass the test cases even though I think my code is correct. I wish to know what the error is …please help!
Failed test cases
hello @vaani787
a) ur solution time complexity is o(n^3) so it will give tle for most of the cases.
b) i m not getting ur logic ,pls explain.
pls refer this for optimised approach->
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.