longest path in a DAG