T
The King of Pots and Pans
On disk I have a 2d table of numbers. Something like this:
9 8 6
4 5 6
I read it in so that I have a list of references to lists. In other
words, a list of the rows.
I want to first sort by column 2, then column 3. When I sort by column
2 I get:
4 5 6
9 8 6
As expected because 5 < 8. When I sort by column 3 I get:
9 8 6
4 5 6
This is unexpected. Since 6 = 6, I don't want it to perform the
sort. See how it was already sorted by column 2 when column 3 elements
were equal, but now column 2 is unsorted again.
9 8 6
4 5 6
I read it in so that I have a list of references to lists. In other
words, a list of the rows.
I want to first sort by column 2, then column 3. When I sort by column
2 I get:
4 5 6
9 8 6
As expected because 5 < 8. When I sort by column 3 I get:
9 8 6
4 5 6
This is unexpected. Since 6 = 6, I don't want it to perform the
sort. See how it was already sorted by column 2 when column 3 elements
were equal, but now column 2 is unsorted again.