Given an array of integers nums and an integer k, compute the number of distinct numbers in every contiguous subarray (window) of size k. For each window, determine how many unique elements it contains and return these counts as an array.
Constraints:
- 1 ≤
k≤nums.length - The array may include any integers (positive, negative, or zero).
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected