Skip to content

Commit 9532807

Browse files
authored
Update moving-stones-until-consecutive-ii.py
1 parent a37ff33 commit 9532807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/moving-stones-until-consecutive-ii.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def numMovesStonesII(self, stones):
88
:rtype: List[int]
99
"""
1010
stones.sort()
11-
left, min_moves = 0, len(stones)
11+
left, min_moves = 0, float("inf")
1212
max_moves = max(stones[-1]-stones[1], stones[-2]-stones[0]) - (len(stones)-2)
1313
for right in xrange(len(stones)):
1414
while stones[right]-stones[left]+1 > len(stones): # find window size <= len(stones)

0 commit comments

Comments
 (0)