Leetcode 3068. Find the Maximum Sum of Node Values
Given a tree where performing an operation on an edge XORs both endpoint node values by k, determine the maximum total node sum achievable by any sequence of operations — equivalently, choose a subset of nodes (subject to the tree's parity constraint from edge operations) to XOR by k so the resulting sum is maximized.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.