select sort, select the min value of the index, swap with the last index of sorted part.

select sort, select the min value of the index, swap with the last
index of sorted part.