mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-08 05:26:07 +00:00
build
This commit is contained in:
@@ -296,7 +296,9 @@ comments: true
|
||||
k = j // 记录最小元素的索引
|
||||
}
|
||||
// 将该最小元素与未排序区间的首个元素交换
|
||||
nums[i] = nums[k].also { nums[k] = nums[i] }
|
||||
val temp = nums[i]
|
||||
nums[i] = nums[k]
|
||||
nums[k] = temp
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user