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.