There was an error while loading. Please reload this page.
1 parent 0b47380 commit a7c58c0Copy full SHA for a7c58c0
JS-Algo/0560. Subarray Sum Equals K.md
@@ -19,7 +19,7 @@ var subarraySum = function(nums, k) {
19
since 7 - (3+4) = 0 and we are looking
20
for if there's a case where Sumi is 0,
21
and there should always be a case for that.
22
- 如果target是仅有的两个数的和,不提前set好[0,1]就会只输出0而不是唯一的一个
+
23
*/
24
map.set(0, 1);
25
for(let i = 0; i < nums.length; i++) {
0 commit comments