Skip to content

Commit da50697

Browse files
committed
Create README - LeetHub
1 parent 24d2fc1 commit da50697

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<h2><a href="https://leetcode.com/problems/subarray-sum-equals-k">560. Subarray Sum Equals K</a></h2><h3>Medium</h3><hr><p>Given an array of integers <code>nums</code> and an integer <code>k</code>, return <em>the total number of subarrays whose sum equals to</em> <code>k</code>.</p>
2+
3+
<p>A subarray is a contiguous <strong>non-empty</strong> sequence of elements within an array.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
<pre><strong>Input:</strong> nums = [1,1,1], k = 2
8+
<strong>Output:</strong> 2
9+
</pre><p><strong class="example">Example 2:</strong></p>
10+
<pre><strong>Input:</strong> nums = [1,2,3], k = 3
11+
<strong>Output:</strong> 2
12+
</pre>
13+
<p>&nbsp;</p>
14+
<p><strong>Constraints:</strong></p>
15+
16+
<ul>
17+
<li><code>1 &lt;= nums.length &lt;= 2 * 10<sup>4</sup></code></li>
18+
<li><code>-1000 &lt;= nums[i] &lt;= 1000</code></li>
19+
<li><code>-10<sup>7</sup> &lt;= k &lt;= 10<sup>7</sup></code></li>
20+
</ul>

0 commit comments

Comments
 (0)