adding max sub array sum problem - kadane algorithm