Question d’entretien chez Cisco

Write a code in your preferred language to transform a matrix.