XYZ interview question

leetcode sliding window probelm was asked