Microsoft interview question

Sliding Window and Hashmap question