(C++) A Different Way To Solve This Problem.
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(K)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfSubarrays(vector<int>& v, int k) {\n        std::ios_base::sync_with_stdio(false);\n        std::cout.tie(nullptr);\n        std::cin.tie(nullptr);\n        queue<int> q;\n        int ans=0,c=0,j=0;\n        for(int i=0;i<v.size();i++)\n        {\n            if(v[i]%2!=0){ \n                c++;\n                q.push(i);\n            }\n            while(c>k)\n            {\n                if(v[j]%2!=0) c--;\n                j++;\n                if(q.front()<j) q.pop();\n            }\n            if(c==k)\n                ans+=(q.front()-j+1);\n        }\n        return ans;\n    }\n};\n```
['Queue', 'Sliding Window', 'C++']