Pregunta de entrevista de Amazon

Leetcode 2 medium question based on sliding window and Hash map