Skip to content

Commit 8735cc8

Browse files
authored
Update 93. 和为s的连续正数序列.md
1 parent 926e8a0 commit 8735cc8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

93. 和为s的连续正数序列.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ class Solution:
55
def findContinuousSequence(self, target: int) -> List[List[int]]:
66
i, j, s, res = 1, 2, 3, []
77
while i<j:
8+
#左边界右移
89
if s == target:
910
res.append(list(range(i,j+1)))
1011
s-=i
1112
i+=1
13+
#左边界右移
1214
elif s>target:
1315
s-=i
1416
i+=1
17+
#右边界右移
1518
else:
1619
j+=1
1720
s+=j
1821
return res
19-
```
22+
```

0 commit comments

Comments
 (0)