Passing 4 out of 5 test cases

it is not passing second test case. i have dry run it but found no error. please tell the error and how to resolve it

Your array does not have 100001th index, just loop till 100000.