Given an integer array arr, return true&nbsp;if there are three consecutive odd numbers in the array. Otherwise, return&nbsp;false.
&nbsp;
Example 1:

Input: arr = [2,6,4,1]
Output: false
Explanation: There are no three consecutive odds.


Example 2:

Input: arr = [1,2,34,3,4,5,7,23,12]
Output: true
Explanation: [5,7,23] are three consecutive odds.


&nbsp;
Constraints:


	1 &lt;= arr.length &lt;= 1000
	1 &lt;= arr[i] &lt;= 1000


class Solution:
    def threeConsecutiveOdds(self, arr: List[int]) -> bool:
        c=0
        for i in arr:
            if i%2==0:
                c=0
            else:
                c+=1
                if c==3:
                    return True
        return False
class Solution {
    public boolean threeConsecutiveOdds(int[] arr) {
        int count = 0,n = arr.length;
        for(int i=0;i<n;i++)
        {
            if((arr[i] & 1) > 0)
            {
                count++;
                if(count == 3) return true;
            }
            else
            {
                count = 0;
            }
        }
        return false;
    }
}
class Solution {
public:
    bool threeConsecutiveOdds(vector<int>& arr) {
        int k = 0;
        for(int i=0;i<arr.size();i++){
            if(arr[i] % 2 != 0){
                k++;
                if(k == 3){
                    return true;
                }
            }else{
                k = 0;
            }
        }
        return false;
    }
};
var threeConsecutiveOdds = function(arr) {
    let c = 0;

    for(let val of arr){
        if(val % 2 === 1){
            c++;
            if(c === 3) {
                return true;
            }
        } else {
            c=0;
        }
    }

    return false;
};
Three Consecutive Odds