Pregunta de entrevista de Nutanix

1 matrix question and 1 - 2 pointers problem