You are given an integer array nums and a swaps, where swaps[i]
The alternating sum of an array nums of length
Return the maximum possible alternating sum of nums after performing any number of swaps.
Constraints:
nums.length
nums[i]
swaps.length
swaps[i].length
swaps[i][0], swaps[i][1]
You are given an integer array nums and a swaps, where swaps[i]
The alternating sum of an array nums of length
Return the maximum possible alternating sum of nums after performing any number of swaps.
Constraints:
nums.length
nums[i]
swaps.length
swaps[i].length
swaps[i][0], swaps[i][1]