Skip to content

Commit e52fd84

Browse files
authored
Update count-collisions-on-a-road.py
1 parent 91ea4ae commit e52fd84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/count-collisions-on-a-road.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def countCollisions(self, directions):
1313
for x in directions:
1414
if x == 'R':
1515
cnt += 1
16-
elif x == 'S' or cnt or not smooth:
16+
elif x == 'S' or (cnt or not smooth):
1717
result += cnt+int(x == 'L')
1818
cnt = smooth = 0
1919
return result

0 commit comments

Comments
 (0)