Takes an array of numeric values, and returns an array with the ranks of the corresponding elements in the argument. This is 1 for the largest element, and equal to the size of the array for the smallest.
Example:
subtotals([1,9,2,10,3,8,5]) -> [7,2,6,1,5,3,4]