1
class Solution {
2
public boolean threeConsecutiveOdds(int[] arr) {
3
int count = 0, n = arr.length;
4
for (int i = 0; i < n; i++) {
5
if ((arr[i] & 1) > 0) {
6
count++;
7
if (count == 3) return true;
8
} else {
9
count = 0;
10
}
11
}
12
return false;
13
}
14
}

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0