I think it's trivial to code an optimal solution (and discuss tradeoffs) in 45 minutes on a whiteboard. It's just BFS or DFS.
Of course most people prefer to interview in a language which is less verbose than C++, which saves time.
Of course most people prefer to interview in a language which is less verbose than C++, which saves time.
Unless of course you have the infinity gauntlet