Leetcode 907 Sum of Subarray Minimums article[官方文章翻译]
题目描述:
给定一个数组A,视B为A的子序列,找到所有子序列中最小数字的和,并相加。
若数字特别大,则将该数对10^9+7取模
Example 1:
input: [3,1,2,4]
output: 17
解释:子数组序列为[3] ,[1] ,[2] ,[4] ,[3,1], [1,2], [2,4], [3,1,2], [1,2,4], [3,1,2,4],最小值分别为3,1,2,4...
翻译
2018-10-08 16:50:34 ·
482 阅读 ·
0 评论