Domanda di colloquio di Google

Matrix question and something with loops