Count Number of Nice Subarrays
Count contiguous subarrays that contain exactly k odd numbers. The visual marks the odd positions and counts the runs of even numbers between them.
Count contiguous subarrays that contain exactly k odd numbers. The visual marks the odd positions and counts the runs of even numbers between them.