TikTok Interview Question

Maximum in k sliding window