somehow fix normal select
This commit is contained in:
parent
f450688cfb
commit
ac37939823
1 changed files with 2 additions and 2 deletions
|
@ -53,8 +53,8 @@ impl NormalSelect {
|
||||||
let mut chunks = list.chunks(5)
|
let mut chunks = list.chunks(5)
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
for chunk in chunks.iter_mut() {
|
for mut chunk in chunks.iter_mut().map(|c| c.to_vec()) {
|
||||||
let chunk = self.insertion.sort(&chunk.to_vec());
|
self.insertion.sort_mut(&mut chunk);
|
||||||
medians.push(chunk[chunk.len() / 2]);
|
medians.push(chunk[chunk.len() / 2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue