Wrong answers despite on modification of the code

heyy, i have repeatedly modified my code but i m still getting two wrong answers. I dont know what is the problem. Please tell me the test cases for which it is failing once again.

@Aparna hey aparna follow this discuss

the code you have suggested has the complexity of o(n^2) only . i think my code also has the same complexity then whats the need of modifying again

@Aparna hey aparna your code is producing wrong output and it need to be change you can check your code with suggested test case.

alright, i’ll see, Thankyou