Easy java solution with 100 percent .
IntuitionApproachmain problem is to change the size of array after adding two minSum element . solution is as we add two element we have to increase the count o
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
main problem is to change the size of array after adding two minSum element . solution is as we add two element we have to increase the count or result so by this we can decrese the size of array by 1 every time we increase the result.

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
     int result = 0;
    public int minimumPairRemoval(int[] nums) {
       
        while(!isSorted(nums)){
            mergPairs(nums);
             result++;
        }

        return result;
    }
    
       boolean isSorted(int [ ] nums){
        int n = nums.length-result;
        for(int i=0;i<n-1;i++){
            if(nums[i]>nums[i+1]){
                return false;
            }
        }
         return true;
       }
       void mergPairs(int [ ] nums){
        int n = nums.length;
        int minSum = Integer.MAX_VALUE,minIndex = -1;
        for(int i=0;i<n-1-result;i++){
            int sum = nums[i]+nums[i+1];
            if(sum<minSum){
                minSum=sum;
                minIndex = i;
            }
        }
        nums[minIndex] = minSum;
        shiftLeft(nums,minIndex+1); 
       }

       void shiftLeft(int [] nums, int idx){
        int n = nums.length-result;
        for(int i=idx;i<n-1;i++){
            nums[i]= nums[i+1];
        }
        
       }
}
```
['Java']