mergeSortComparator

typealias mergeSortComparator = (a: Any, b: Any, userDefinedObject: Any?) -> Double(source)

A function used to compare two items while performing a merge sort.

function compareNumbers(a, b, userDefinedObject) {
return a - b;
}

Parameters

a

An item in the array.

b

An item in the array.

userDefinedObject

An object that was passed to mergeSort.