首页 > TAG信息列表 > Minimums
[LeetCode] 907. Sum of Subarray Minimums
Given an array of integers arr, find the sum of min(b), where b ranges over every (contiguous) subarray of arr. Since the answer may be large, return the answer modulo 109 + 7. Example 1: Input: arr = [3,1,2,4] Output: 17 Explanation: Subarrays are [3LeetCode 907. Sum of Subarray Minimums
原题链接在这里:https://leetcode.com/problems/sum-of-subarray-minimums/ 题目: Given an array of integers arr, find the sum of min(b), where b ranges over every (contiguous) subarray of arr. Since the answer may be large, return the answer modulo 109 + 7.