diff --git a/app/src/main/java/de/uni_marburg/powersort/FinnSort/FinnSort.java b/app/src/main/java/de/uni_marburg/powersort/FinnSort/FinnSort.java index a0e4dbb..341603f 100644 --- a/app/src/main/java/de/uni_marburg/powersort/FinnSort/FinnSort.java +++ b/app/src/main/java/de/uni_marburg/powersort/FinnSort/FinnSort.java @@ -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));