Fix the issue of discussion 514 (#1064)

pull/1043/head^2
易春风 10 months ago committed by GitHub
parent 7a80555a2c
commit d4d281cd67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -8,6 +8,9 @@ include!("../include/include.rs");
/* 选择排序 */
fn selection_sort(nums: &mut [i32]) {
if nums.is_empty() {
return;
}
let n = nums.len();
// 外循环:未排序区间为 [i, n-1]
for i in 0..n-1 {

Loading…
Cancel
Save