Qualcomm interview question

Smallest subarray with k distinct integers