TikTok interview question

Maximum in k sliding window