How can I numbering the elements in descending order of second elements of sublists? For example, if I have the list which is
m={{1, 5}, {2, 8}, {3, 9}, {4, 2}, {5, 9}, {6, 7}, {7, 9}, {8, 10}, {9, 5}, {10, 2}};
The smallest second element is 2 of {10,2}
so its number is 1.
Second smallest second element is also 2 of {4,2}
so its number will be 2.
The output that I want is then: {4, 6, 9, 2, 8, 5, 7, 10, 3, 1}
.
How can I do this?
SortBy
. $\endgroup$