Pergunta de entrevista da empresa Tech extensor

They were asked Problem solving logic to me.