Gives the positions that order a list by a function applied to each element
OrderingBy[list, f]
OrderingBy[list, f, n]
OrderingBy[list, f, - n]
OrderingBy[list, f, n, p]
OrderingBy[f]
OrderingBy[Range[-5, 5], Abs, 3]
→ {6, 5, 7}OrderingBy[Range[-5, 5], Abs, -3]
→ {10, 1, 11}OrderingBy[{"list", "of", "strings"}, StringLength]
→ {2, 1, 3}