Skip to content

Commit 2943742

Browse files
committed
Create README - LeetHub
1 parent 705e675 commit 2943742

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<h2><a href="https://leetcode.com/problems/sum-of-subarray-minimums/">907. Sum of Subarray Minimums</a></h2><h3>Medium</h3><hr><div><p>Given an array of integers arr, find the sum of <code>min(b)</code>, where <code>b</code> ranges over every (contiguous) subarray of <code>arr</code>. Since the answer may be large, return the answer <strong>modulo</strong> <code>10<sup>9</sup> + 7</code>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
6+
<pre><strong>Input:</strong> arr = [3,1,2,4]
7+
<strong>Output:</strong> 17
8+
<strong>Explanation:</strong>
9+
Subarrays are [3], [1], [2], [4], [3,1], [1,2], [2,4], [3,1,2], [1,2,4], [3,1,2,4].
10+
Minimums are 3, 1, 2, 4, 1, 1, 2, 1, 1, 1.
11+
Sum is 17.
12+
</pre>
13+
14+
<p><strong class="example">Example 2:</strong></p>
15+
16+
<pre><strong>Input:</strong> arr = [11,81,94,43,3]
17+
<strong>Output:</strong> 444
18+
</pre>
19+
20+
<p>&nbsp;</p>
21+
<p><strong>Constraints:</strong></p>
22+
23+
<ul>
24+
<li><code>1 &lt;= arr.length &lt;= 3 * 10<sup>4</sup></code></li>
25+
<li><code>1 &lt;= arr[i] &lt;= 3 * 10<sup>4</sup></code></li>
26+
</ul>
27+
</div>

0 commit comments

Comments
 (0)