A stable Quicksort that swaps the roles of the main array and a scratch buffer at each recursion level, routing elements directly into their final regions so no copy-back is needed. Falls back to bottom-up merge sort when the recursion budget runs out.
The dest-swap technique eliminates copy-back overhead, achieving the same ping-pong effect as merge-sort-based algorithms. The merge sort fallback provides an O(n log n) worst-case guarantee.