sort
Sorts a given array within a specified range based on a selector function that maps each element to a Double
value.
Parameters
a
The array to be sorted.
start
The starting index (inclusive) of the range to sort. Defaults to 0.
end
The ending index (exclusive) of the range to sort. Defaults to the size of the array.
selector
A lambda function that takes an element of the array and returns a Double
value to sort by.