Hi all again, yesterday helped me solve a problem by lists, but now I came the next problem, given following matrix {{3,25,17}, {6,27,33}, {4,29,23 }, {5,37,19}, {7,20,35}, {4,19,31}} sort according to the following condition, the second element must always be greater than the third element, in this example we {6,27,33} note that the third element is greater than the second, in this case to do an exchange to be finally {6,33,27} so is {7,20,35} and finally {4,19,31} which should be respectively {7,35,20} and {4,31,19}.
and the list would look like:
{{3,25,17}, {6,33,27}, {4,29,23}, {5,37,19}, {7,35,20}, {4,31,19}}
thanks in advance. Keep in touch