Determining if a directed graph is connected in a specific manner?

后端 未结 0 1768
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-08 07:32

Given a directed graph I have to see if the task nodes are connected to the start and end node. For example:

Is not valid since task 4 can not reach end node.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题