Given a graph where nodes have values, identify all connected components. Return them sorted by the sum of node values (descending), then by the number of nodes (descending).
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.