Domanda di colloquio di Google

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