@tempots/std
sortArray() function
Sorts an array in place using the provided compare function.
Signature:
sortArray: (arr: A[], compare: Compare) => A[]
Parameters
Parameter |
Type |
Description |
---|---|---|
arr |
A[] |
The array to be sorted. |
compare |
The compare function used to determine the order of the elements. |
Returns: A[]
The sorted array.