select the minimum and swap with the first select the minimum from the second item and swap with the second