mirror of
https://gitlab.uni-marburg.de/langbeid/powersort.git
synced 2025-01-22 19:55:44 +01:00
Fixed the merging order of FinnSort
This commit is contained in:
parent
b1f94636c7
commit
59bfd44f45
@ -28,7 +28,7 @@ public class FinnSort {
|
|||||||
int p = power(runs.getLast(), new Run(i, j, 0), n);
|
int p = power(runs.getLast(), new Run(i, j, 0), n);
|
||||||
|
|
||||||
while (runs.size() >= 2 && p < power(runs.getLast(), runs.get(runs.size() - 2), n)) {
|
while (runs.size() >= 2 && p < power(runs.getLast(), runs.get(runs.size() - 2), n)) {
|
||||||
basicMerge(a, runs.removeFirst(), runs.removeFirst(), c);
|
basicMerge(a, runs.removeLast(), runs.removeLast(), c);
|
||||||
}
|
}
|
||||||
|
|
||||||
runs.add(new Run(i, j, p));
|
runs.add(new Run(i, j, p));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user