Skip to content

Commit d552f3c

Browse files
committed
Create README - LeetHub
1 parent 0ca504f commit d552f3c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<h2>974. Subarray Sums Divisible by K</h2><h3>Medium</h3><hr><div><p>Given an array <code>nums</code> of integers, return the number of (contiguous, non-empty) subarrays that have a sum divisible by <code>k</code>.</p>
2+
3+
<p>&nbsp;</p>
4+
5+
<div>
6+
<p><strong>Example 1:</strong></p>
7+
8+
<pre><strong>Input: </strong>nums = <span id="example-input-1-1">[4,5,0,-2,-3,1]</span>, k = <span id="example-input-1-2">5</span>
9+
<strong>Output: </strong><span id="example-output-1">7</span>
10+
<strong>Explanation: </strong>There are 7 subarrays with a sum divisible by k = 5:
11+
[4, 5, 0, -2, -3, 1], [5], [5, 0], [5, 0, -2, -3], [0], [0, -2, -3], [-2, -3]
12+
</pre>
13+
14+
<p>&nbsp;</p>
15+
16+
<p><strong>Note:</strong></p>
17+
18+
<ol>
19+
<li><code>1 &lt;= nums.length &lt;= 30000</code></li>
20+
<li><code>-10000 &lt;= nums[i] &lt;= 10000</code></li>
21+
<li><code>2 &lt;= k &lt;= 10000</code></li>
22+
</ol>
23+
</div>
24+
</div>

0 commit comments

Comments
 (0)