Minimum Adjacent Swaps to Make a Valid Array
Slide the leftmost minimum to the front, then the rightmost maximum to the back, counting each adjacent swap.
Slide the leftmost minimum to the front, then the rightmost maximum to the back, counting each adjacent swap.