Given an integer array , find the contiguous subarray with the largest sum and return its sum.
For example, if , the answer is (subarray ).
Hint: at each position, decide whether to extend the current subarray or start a new one. This uses algebraic comparison: is better than just ?