Does there exist a way an efficient method to find the longest path in a DAG among all possible paths? I know how to solve this in $$$O(n^2)$$$ by considering each vertex as the source, and then using topo sort, followed by simple relaxation of edges. Any suggestions/help would be appreciated or maybe we can prove there doesn't exist a faster method. Thanks!