Update Maximum Subarray

Refactor to use 2 vars instead of 2 arrays