Nutanix interview question

1 matrix question and 1 - 2 pointers problem