Count Subarrays With Exactly K Odd Numbers
Asked at Expedia · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026
Given an array of integers and a number `k`, count the contiguous pieces of the array that contain exactly `k` odd numbers. Only whether each element is odd or even matters, not how large it is.
Loading the problem…
More Expedia interview questions
- Implement a Basic Tokenizer and Train a Simple LLM-like Model in a Notebook Case Study
- Number of Provinces
- Minimum Additional Capabilities to Equalize Team Work Hours
- Get Maximum Efficiency
- Get Minimum Steps
- Scattered Palindrome Substring Count (Swappable to Palindrome)