MathWorks interview question

Don't remember exactly, but DFS Graph question