Pregunta de entrevista de Citadel

Maze problem involving a matrix and recursion