☕ Java solution
![Screenshot_1.png](https://assets.leetcode.com/users/images/7e7d101c-8001-45a1-b81e-16cc51d8440f_1743935952.9286087.png)

```java []
class Solution {
    public int minimumPairRemoval(int[] nums) {
        int n = nums.length;
        int ans = 0;
        
        while (!isSorted(nums, n)) {
            int minIdx = 0, minSum = Integer.MAX_VALUE;
            
            for (int i = 0; i < n - 1; i++) {
                int sum = nums[i] + nums[i + 1];
                if (sum < minSum) {
                    minSum = sum;
                    minIdx = i;
                }
            }
            
            nums[minIdx] += nums[minIdx + 1];
            for (int i = minIdx + 1; i < n - 1; i++) {
                nums[i] = nums[i + 1];
            }
            n--;
            ans++;
        }
        
        return ans;
    }

    private boolean isSorted(int[] nums, int length) {
        for (int i = 0; i < length - 1; i++) {
            if (nums[i] > nums[i + 1]) return false;
        }
        return true;
    }
}

```
['Java']