The solution to the Max Subarray challenge here: http://www.cprogramming.com/challenges/array_sum.html
does not work for an input of all negative integers.
For example
put through the function should return -1. But the solution code returns 0.Code:int y[] = {-9, -8, -7, -5, -1, -9};