update median thing
This commit is contained in:
parent
7c45c5e026
commit
2d1d836575
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ impl NormalSelect {
|
|||
for i in (lo..=hi).step_by(k) {
|
||||
if i + (k - 1) <= hi {
|
||||
self.insertion_sort(list, i, i + (k - 1));
|
||||
medians[index] = list[i + 2];
|
||||
medians[index] = list[i + (k / 2)];
|
||||
index += 1;
|
||||
} else {
|
||||
self.insertion_sort(list, i, hi);
|
||||
|
|
Loading…
Reference in a new issue