Master longest path in a directed acyclic graph (DAG): a polynomial-time graph-DP that combines topological sort with memoised DFS. The same template solves LeetCode 329 Longest Increasing Path, course planning with prerequisites, and critical-path scheduling — a FAANG interview pattern at Google, Amazon, and Meta.