This is a modified version of the Kadane's algorithm to find the maximum sum of a contiguous subarray given a random input array.
This presentation is a part of the blog http://rerun.me/blog/2012/08/30/maximum-continuous-subarray-problem-kandanes-algorithm/