← ALL NOTES
Array

3068. Find the Maximum Sum of Node Values

Given a tree with values nums on the nodes, a number k, and edges. Per operation, for an edge (u, v) you replace nums[u] ^= k and nums[v] ^= k. Any number of operations. Find the maximum achievable…

Loading…