Why is my code giving run error for one of the test cases?

please help correct my code

@aryapandey194_31bab11b21ee53fb you have taken size of the array small (100) take the size 100000 it will work fine
if you dout is clear mark it as resolved and rate my experience

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.