Pergunta de entrevista da empresa IBM

Slinding window based coding Hacker Rank question