#2567
Minimum Score by Changing Two Elements
specialist · 930 · lc medium +32 · 49.8% accepted · 272 likes · top 37%
Description
Given an integer array nums, its score is the sum of the maximum absolute pairwise difference (high score) and the minimum absolute pairwise difference (low score). You may change any two elements. Return the minimum possible score after making those two changes.
Code
1
2
3