Given an array of integers nums and an integer k, return the number of nice subarrays. A subarray is nice if it has exactly k odd numbers among its elements.
Input: Integer array nums and integer k.
Output: Integer — count of subarrays with exactly k odd numbers.
Input: [1,1,2,1,1],3
Output: 2
Explanation: [1,1,2,1] and [1,2,1,1] each contain 3 odd numbers.Input: [2,4,6],1
Output: 0
Explanation: No odd numbers → no nice subarrays.Input: [2,2,2,1,2,2,1,2,2,2],2
Output: 16
Explanation: 16 subarrays contain exactly 2 odd numbers.1<=nums.length<=500001<=nums[i]<=10^51<=k<=nums.length