Concepts2
⚙️AlgorithmIntermediate
Topological Sort - DP on DAG
Topological sort orders vertices of a directed acyclic graph (DAG) so every edge goes from earlier to later, which is perfect for dynamic programming (DP).
#topological sort#dag dp#longest path dag+12
⚙️AlgorithmIntermediate
Topological Sort
Topological sort orders the nodes of a directed acyclic graph (DAG) so every edge points from left to right in the order.
#topological sort#kahn algorithm#dfs topological order+12