Google interview question

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