Meta Interview Question

They asked a 2D Matrix related question