Given nodes with weights and a set of binary connections between nodes, construct an algorithm that sums the weights of connected nodes for each connection, updates the weight of each node with that sum, and returns the largest weight after realizing each connection.
Sigiloso
Brute force [O(n^3), n is number of nodes] approach in python.