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
#leetcode #dsa #stack #monotonicstack
Download
0 formats
No download links available.
LeetCode | 907. Sum of Subarray Minimums | Stack | Monotonic Stack | NatokHD