MergeSort variants do not allocate arrays on the stack anymore, fixes stack overflow