Topological Sort - Longest Path With Different Adjacent Characters
Consider two approaches to solve the longest path with different adjacent characters in a DAG: (1) Topological sort + DFS with memoization, and (2) Topological sort + iterative DP. When is the DFS with memoization approach preferable over the iterative DP?
