Can someone provide test-case(s) for which the following code is wrong.

Problem link-

If u cant find any ,mention it.

Your Code is not readable. Please delete the comments and use proper indentation if you are hoping for someone to answer your query in this forum.

1 Like

Thanks for notifying that.

Still there is issue of indentation in your code. But here is my solution. You can generate some test cases randomly to check where your output is differing with my solution.Hope it helps

I have checked many correct solutions with mine by giving random inputs but all efforts in vain . That is the reason why i have posted here.
All i want is to find some test cases for which my code is giving wrong answer.

Your code will fail for random test case (May be probability will be very less).
I change your code minimally just for AC ( Not even indented :slight_smile: ). Here is the code -
I am sure you will notice changes & why you need those.

I partially understand your question . can u elaborate it in detail.