Longest path in DAG