IBM interview question

Leetcode style question using a sliding window and hashmaps