Pergunta de entrevista da empresa BigBinary

It was a leetcode problem