Solve maze reachability and two follow-ups | Meta Interview Question