Microsoft Interview Question

Sliding Window and Hashmap question