Available question text
Compute the sum of the minimum element of every contiguous subarray of arr, returned modulo 10^9+7. Because n can be up to 3·10^4, the intended approach counts how many subarrays each element is the minimum (a monotonic-stack previous/next-smaller pattern) to achieve O(n) time.
Related questions
Continue with questions that share topics or the same question type.
- Continuous Subarray Sum
Coding
- Divide an array into subarray with equal sum.
Coding
- Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Walk through Kadane's algorithm and explain the O(n) approach.
Coding
- Kth Smallest Subarray Sum
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 907. Sum of Subarray Minimums
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source