Cannot find error

for challenge maximum sub array,the submission was showing run time errors, then after increasing array size, it is showing test case fails! what mistake am i doing?