#2567
Minimum Score by Changing Two Elements
medium · 49.8% accepted · 272 likes · top 37%
Description
You are given an integer array nums.
- The low score of nums is the minimum absolute difference between any two integers.
- The high score of nums is the maximum absolute difference between any two integers.
- The score of nums is the sum of the high and low scores.
Return the minimum score after changing two elements of nums.
Solution