Skip to content

Commit 63e3afc

Browse files
authored
Update circular-array-loop.py
1 parent 55a8322 commit 63e3afc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Python/circular-array-loop.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ def next_index(nums, i):
4242
break
4343
return True
4444

45-
slow = i
46-
val = nums[i]
45+
slow, val = i, nums[i]
4746
while nums[slow] * val > 0:
4847
tmp = next_index(nums, slow)
4948
nums[slow] = 0

0 commit comments

Comments
 (0)