Pocket Gems Interview Question

Maximum subarray sum.