Topological Sort - Longest Path With Different Adjacent Characters
Suppose the problem is extended to allow cycles in the graph, but the path must still have no two adjacent nodes with the same character. Which approach is necessary to correctly solve this variant?
