Skip to content

Commit 29a7722

Browse files
committed
Time: 50 ms (35.31%), Space: 16.7 MB (67.76%) - LeetHub
1 parent 9ddc5fc commit 29a7722

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution:
2+
def threeConsecutiveOdds(self, arr: List[int]) -> bool:
3+
count=0
4+
for num in arr:
5+
if num%2!=0:
6+
count+=1
7+
if count==3:
8+
return True
9+
else:
10+
count=0
11+
return False

0 commit comments

Comments
 (0)