Microsoft interview question

Solve a maze (Recursion question)