Topological Sort - Longest Path With Different Adjacent Characters
Given a DAG with 4 nodes and edges [[0,1],[1,2],[0,3]], and node characters s="abac", the dp array after processing topological order is [1,2,3,2]. Which node corresponds to the longest path ending with length 3?
