Fundamentals/Longest Path | Dynamic Programming
← PrevNext →
Given a DAG as an adjacency list of n nodes (0..n-1), return the length of the longest path (number of edges) using DP over topological order.