public void selectedSort() {
int in, out, min;
for (out = 0; out < A.length - 1; out++) {
min = out;
for (in = out + 1; in < A.length; in++)
if (A[in]<A[min])
min = in;
swap(A, out, min);
}
}
Java实现选择排序
最新推荐文章于 2021-05-06 22:10:39 发布