Find Continuous Subarray With Maximum Sum Problem - Kadane's Algorithm
Update :Previous version of the code failed for some inputs, as pointed out by @Thinker in the first comment. Changes to the program and the presentation were made. Tested to satisfy most conditions that I could google for.
In a desperate attempt to increase my sad looking stackoverflow reputation, I replied to an old but interesting problem.
The problem goes like this :
Given Random integers in array. Find the greatest sum of a continuous subset