Microsoft Interview Question

maze question - more complex than in first thought