Topological Sort - Longest Path With Different Adjacent Characters
Consider the following code snippet implementing the optimal solution for the longest path with different adjacent characters problem. Given
n = 3, edges = [[0,1],[1,2]], and s = "aba", what is the final returned value?