Skip to content

Commit 1db8e5b

Browse files
authored
Create Solution2.go
1 parent 99b29a5 commit 1db8e5b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
func threeConsecutiveOdds(arr []int) bool {
2+
for i, n := 2, len(arr); i < n; i++ {
3+
if arr[i-2]&arr[i-1]&arr[i]&1 == 1 {
4+
return true
5+
}
6+
}
7+
return false
8+
}

0 commit comments

Comments
 (0)