Dafiti interview question

Resolver um problema no estilo leet code