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:
Claude
2026-12-03 23:34:17 +05:30
parent 5419e5057d
commit 5ed8dca130
42 changed files with 1710 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
Cross-checks against Arrays.sort and the O(n^2) inversion definition
====================================================================
every array of length 0..8 over 5 values: 488,281 arrays
random arrays, length 0..199 (seed 2026): 20,000 arrays
each checked: top-down, bottom-up, skip-sorted, linked list (top-down), linked list (bottom-up), inversion count
disagreements: 0
stability, records with 5 distinct keys: 5,000 arrays, same object order as Arrays.sort(T[], Comparator): 0 disagreements