Pergunta de entrevista da empresa Amazon

Find the maximum element in the given sliding window.