// removes the source, then the nodes with incoming edge only from
// the source, etc. If it can remove all the nodes that way, the
// graph is a DAG. If at some point it can not remove node anymore
// removes the source, then the nodes with incoming edge only from
// the source, etc. If it can remove all the nodes that way, the
// graph is a DAG. If at some point it can not remove node anymore