At Most K Odd Numbers — Solution & Editorial
Sliding window where the constraint is the count of odd elements: expand right, shrink while the count exceeds K.
Complexity: O(N)
Sliding window where the constraint is the count of odd elements: expand right, shrink while the count exceeds K.
Complexity: O(N)