mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 15:06:07 +00:00
build
This commit is contained in:
@@ -186,7 +186,7 @@ comments: true
|
||||
int k = i;
|
||||
for (int j = i + 1; j < n; j++) {
|
||||
if (nums[j] < nums[k])
|
||||
k = j; // 记录最小元素的索引
|
||||
k = j; // 记录最小元素的索引
|
||||
}
|
||||
// 将该最小元素与未排序区间的首个元素交换
|
||||
int temp = nums[i];
|
||||
|
||||
Reference in New Issue
Block a user