I was thinking on this quite a bit and I think the answer.You are trying to find descendants of a given node. Or, in other words, you are trying to find whether a path exists between X and Y in a DAG. If there is a path X->A->B->C->Y then you can ignore the edge X->Y because you already found a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.