ReverseSortBy
ReverseSortBy[list, f] sorts the elements of list using the reverse canonical order defined by applying f to each of them.
ReverseSortBy[list, f, p]sorts the elements of list using the function p to compare pairs of results of applying f to each element.ReverseSortBy[f]represents an operator form ofReverseSortBythat can be applied to an expression.
Examples
ReverseSortBy[{1, -3, 2, -5}, Abs]ReverseSortBy[{"apple", "pie", "cake"}, StringLength]Please visit the official Wolfram Language Reference for more details.