Pergunta de entrevista da empresa Infosys

A puzzle was quite difficult