Just practice
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution(object):\n    def maximumValueSum(self, nums, k, edges):\n        """\n        :type nums: List[int]\n        :type k: int\n        :type edges: List[List[int]]\n        :rtype: int\n        """\n        l1 = list(map(lambda x, k=k: (x ^ k, 1) if (x ^ k) > x else (x, 0), nums))\n\n        sum_ = sum(list(map(lambda x: x[0], l1)))\n\n        val_cnt = len(list(filter(lambda x: x[1], l1)))\n\n        l3 = list(map(lambda x, k=k: (x ^ k) -x if (x ^ k) > x else x -(x^k) , nums))\n\n        return sum_ if val_cnt % 2== 0  else sum_ - min(l3)\n        \n```
['Python']