Skip to content

Commit 9f23388

Browse files
authored
Update Solution.py
1 parent 00307a8 commit 9f23388

File tree

1 file changed

+4
-4
lines changed
  • solution/1500-1599/1550.Three Consecutive Odds

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
class Solution:
22
def threeConsecutiveOdds(self, arr: List[int]) -> bool:
33
cnt = 0
4-
for v in arr:
5-
if v & 1:
4+
for x in arr:
5+
if x & 1:
66
cnt += 1
7+
if cnt == 3:
8+
return True
79
else:
810
cnt = 0
9-
if cnt == 3:
10-
return True
1111
return False

0 commit comments

Comments
 (0)