3496. Maximize Score After Pair Deletions
ArrayGreedy
Hints
Hint 1
The number of operations is
floor((n - 1) / 2), so the number of remaining elements is n - 2 * floor((n - 1) / 2).Hint 2
There will be either 1 or 2 elements remaining.
Hint 3
If there is 1 element remaining, let it be the minimum element.
Hint 4
If there are 2 elements remaining, let them be the adjacent elements with the minimum sum.
Preparing judge…