Algorithm 1 Linear Time Maximum Subarray
Input: An array .
Output: A tuple representing the maximun subarray of and its summation.
1:
2: // is the maximum subarray and s is its summation
3:
4: // tmp is the summation of
5:for to do
6:if then
7:
8:
9:else
10:
11:end if
12:if then
13:
14:end if
15:end for
16:return