Pocket Gems interview question

Maximum subarray sum.