Swift💯 Brute Force+Recursion
Brute Force (accepted answer)
**Brute Force (accepted answer)**
```
class Solution {
    func minimumPairRemoval(_ nums: consuming [Int], _ ops: Int = 0) -> Int {
        var minSum = Int.max
        var minSumIndex = -1
        var isSorted = true

        for i in nums.indices.dropLast(1) {
            isSorted = isSorted && nums[i] <= nums[i+1]
            let sum = nums[i] + nums[i+1]
            guard sum < minSum else { continue }
            minSum = sum
            minSumIndex = i
        }
        guard !isSorted else { return ops }
        nums[minSumIndex...minSumIndex+1] = [minSum]
        return minimumPairRemoval(nums, ops+1)
    }
}
```
['Swift']