in reply to Re: Re: I need to sort a 2D list.
in thread I need to sort a 2D list.

Well that should be easy - instead of incrementing by one each time through the loop, you need to count the number of values at that rank. Then do a separate increment before and after using the rank.

I reckon for num values at the given rank you would need (num - 1)/2 as the post-increment and (num - postincrement) as the pre-increment, but you know what you are trying to achieve.

-- iakobski