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.
final def merge[A : Ordering](in: Array[A], out: Array[A], start: Int, mid: Int, end: Int): Unit
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 output to write to.
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 output to write to.
Attributes
final def sort[A : Ordering : ClassTag](data: Array[A]): Unit