Helper method for mergeSort, used to do a single "merge" between two sections of the input array.
Helper method for mergeSort, used to do a single "merge" between two sections of the input array. The start, mid and end parameters denote the left and right ranges of the input to merge, as well as the area of the ouput to write to.
In-place merge sort implementation. This sort is stable but does mutate the given array. It is an in-place sort but it does allocate a temporary array of the same size as the input. It uses InsertionSort for sorting very small arrays.