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
+7
View File
@@ -0,0 +1,7 @@
The midpoint, with indices near the top of the int range (arithmetic only, no array allocated)
==============================================================================================
lo = 1,200,000,000 hi = 1,500,000,000
(lo + hi) / 2 = -797,483,648
lo + (hi - lo) / 2 = 1,350,000,000
(lo + hi) >>> 1 = 1,350,000,000