Maximum Score From Subarray Minimums Leetcode Javascript 30