Nutanix Interview Question

1 matrix question and 1 - 2 pointers problem