Regarding test cases

Sir my code is running fine if i am testing it. But when i submitted, it is showing run time error

code and logic is correct
just change the size of array
1 <= N <= 100000

Modified Code