Showing run error during submit , but custom testcase ran

code:

I have changed the size of array and temp array. Plz refer to it :