Not getting output in some cases

I don’t know why in one case, it’s giving mle and one is giving wrong ans, what is the error?

hi @paidaarpit1505_f9664148aad841e0,
sample test case output :
2 => 1 <= END
3 => 2 <= END
END => 3 <= END

your output :
2 => 1 <= END
END => 2 <= 3 // opposite side
END => 3 <= END

correct this and add a break statement after u got the index value else it will iterate completely getting TLE OR MLE

i did that but still not getting correct output

hi @paidaarpit1505_f9664148aad841e0 where the updated code i couldnt see any submission after i suggested correction
refer this

input lene ka locha tha actually :slight_smile:

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.