← ALL NOTES
Hash Table

1857. Largest Color Value in a Directed Graph

Directed graph: colors[i] is node i's colour, edges the arcs. A path's color value is the maximum count of same-coloured nodes along it. Return the largest color value over all paths, or −1 if the…

Loading…