Pregunta de entrevista de Google

I was asked to write an efficient algorithm to solve a maze problem.