Amazon interview question

Leetcode 215 Min Subarray sum modification