Microsoft interview question

Classic maze question (search leetcode)