C solution using "at least k" approach
Algorithm\nMaintain two pointers i and j. If the number of odd numbers between i and j inclusive (i >= j) is exactly k then the number of subarrays with "at lea
# Algorithm\nMaintain two pointers `i` and `j`. If the number of odd numbers between `i` and `j` inclusive (`i >= j`) is exactly `k` then the number of subarrays with "at least `k`" odd numbers from `j` onwards will be given as `numsSize - i`.\n\nReturn the difference between the number of subarrays with "at least `k`" odd numbers and the number of subarrays with "at least `k + 1`" odd numbers".\n# Code\n```\nint subArrayAtLeastK(int *nums, int numsSize, int k) {\n    int i, j=0, count=0, odds=0;\n    for (i = 0; i < numsSize; ++i) {\n        odds += (nums[i] & 1);\n        while(odds == k) {\n            count += numsSize - i;\n            odds -= (nums[j++] & 1);\n        }\n    }\n    return count;\n}\n\nint numberOfSubarrays(int* nums, int numsSize, int k) {\n    return subArrayAtLeastK(nums, numsSize, k) - \n           subArrayAtLeastK(nums, numsSize, k+1);\n}\n```
['C']