mergeSortInPlace

In-place merge sort, based on C++ STL's stable_sort(). O(N log<sup>2</sup> N) time complexity, O(1) space complexity, stable. Much slower than plain old mergeSort(), so only use it if you really need the O(1) space.

T[0]
mergeSortInPlace
(
alias compFun = "a < b"
T...
)
()
if (
T.length != 0
)
in { assert (data.length > 0); size_t len = data[0].length; foreach (array; data[1 .. $]) { assert (array.length == len); } }

Meta