Maximum Difference Across Connected Components

Problem: Maximum Difference Across Connected Components

You are given an undirected graph with nodes labeled 1..gNodes. The edges are described by two lists gFrom[i] and gTo[i] (edge i con...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: