Minimum Pair Removal to Sort Array I
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.