Topological Sort - Largest Color Value in a Directed Graph
You are given a directed graph where each node has a color represented by a lowercase letter. You want to find the maximum number of occurrences of any single color along any path in the graph, or detect if a cycle exists. Which algorithmic pattern best fits this problem?
