MAXIMUM SUBARRAY SUM :- Run Error

Can anyone tell me why it is showing run error?
here is my code-> https://ide.codingblocks.com/#/s/24280
Is this a TLE?

  1. You are solving it in O(N^3) but you are expected to solve it in O(N) using Kadane’s algorithm. So it may give TLE.
  2. Array you used is of size 100, so if n>100, it will produce a segfault runtime error.

Thanks, It worked :slight_smile: