mirror of
https://gitlab.uni-marburg.de/langbeid/powersort.git
synced 2025-01-21 19:50:35 +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);
|
||||
|
||||
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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user