[C++] Map Solution | Easy Implementation
\nint numberOfSubarrays(vector<int>& nums, int k) {\n\tint res = 0, sum = 0, n = nums.size();\n\tunordered_map<int, int> mpp;\n\tfor (int i = 0; i < n; ++i) {\n
```\nint numberOfSubarrays(vector<int>& nums, int k) {\n\tint res = 0, sum = 0, n = nums.size();\n\tunordered_map<int, int> mpp;\n\tfor (int i = 0; i < n; ++i) {\n\t\tmpp[sum]++;\n\t\tsum += nums[i] & 1;\n\t\tres += mpp[sum - k];\n\t}\n\treturn res;\n}\n```
['C', 'C++']