One test case is not passing

bro,
there is some out of bound( therefore run error) that is getting indexed, and its difficult to debugg where it is happening

i am sharing a much smaller simpler version of the code.

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.