Minimum Pair Removal to Sort Array II
Repeatedly merge the adjacent pair with the smallest sum, leftmost on ties, until the array never decreases; count the merges.
Repeatedly merge the adjacent pair with the smallest sum, leftmost on ties, until the array never decreases; count the merges.