#573·leetcode

【专题】 考虑每一项对结果的贡献

作者: azl397985856创建于 2022年11月18日更新于 2022年11月18日
标签专题

A common problem is to give you an array, and then give you an index, and ask you to find the sum of that index. For example, give you an array, give you an index for the maximum value of a subarray, and ask you to find the sum of all the maximum values of the subarrays. We can consider the contribution of each item in the array, and then add it up.

内容来源: azl397985856/leetcode