Pregunta de entrevista de Block

it is about 2D Matrix