EASY PYTHON SOLUTION ||
TIME COMPLEXITY - O(nlogn)\nSPACE COMPLEXITY - O(n)\n\nPERFORMING THE XOR OPERATION ON ANY 2 NODES AND FINDING DELTA THE DIFFERENCE BETWEEN ORIGINAL AND NEW NOD
TIME COMPLEXITY - O(nlogn)\nSPACE COMPLEXITY - O(n)\n\nPERFORMING THE XOR OPERATION ON ANY 2 NODES AND FINDING DELTA THE DIFFERENCE BETWEEN ORIGINAL AND NEW NODE VALUES .\nIF THE DIFFERENCE IS POSITIVE WE ADD IT TO THE TOTAL DEALTA OTHERWISE BREAK IT .\n\n# Code PYTHON\n```\nclass Solution:\n    def maximumValueSum(self, nums: List[int], k: int, edges: List[List[int]]) -> int:\n        delta = [(n^k)- n for n in nums]\n        delta.sort(reverse=True)\n        res=sum(nums)\n\n        for i in range(0,len(nums),2):\n            if i == len(nums)-1:\n                break\n            total_delta = delta[i]+delta[i+1]\n            if total_delta <= 0:\n                break\n\n            res+=total_delta\n\n        return res\n```
['Python3']