Comparator
A function used to compare two items while sorting a queue.
function compareNumbers(a, b) {
return a - b;
}
Content copied to clipboard
Parameters
a
An item in the array.
b
An item in the array.
A function used to compare two items while sorting a queue.
function compareNumbers(a, b) {
return a - b;
}
An item in the array.
An item in the array.