Add merge-sort module: top-down and bottom-up merge sort, dry runs, stability, comparison counts against the exact worst case, linked lists, counting inversions, quick sort and TimSort comparisons, and the 2015 program re-run (unstable on ties, quadratic allocation) (17 tests, 15 transcripts)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6vDJ5fWY5uEZaJFNi
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
From lib/src.zip of Java 25.0.5.1
|
||||
=================================
|
||||
|
||||
Arrays.java, line 98:
|
||||
public static void sort(int[] a) {
|
||||
DualPivotQuicksort.sort(a, 0, 0, a.length);
|
||||
}
|
||||
|
||||
Arrays.java, line 1034:
|
||||
public static void sort(Object[] a) {
|
||||
if (LegacyMergeSort.userRequested)
|
||||
legacyMergeSort(a);
|
||||
else
|
||||
ComparableTimSort.sort(a, 0, a.length, null, 0, 0);
|
||||
}
|
||||
|
||||
Arrays.java, line 989:
|
||||
Boolean.getBoolean("java.util.Arrays.useLegacyMergeSort");
|
||||
|
||||
TimSort.java, line 80:
|
||||
private static final int MIN_MERGE = 32;
|
||||
|
||||
Reference in New Issue
Block a user