Pergunta de entrevista da empresa Google

Coding problem related to lists manipulation