Have you ever wondered why the meaning of sorting in computing (ordering or ranking) is different from its everyday meaning (dividing into piles or categories)? The answer has to do with the history of sorting going back 130 years and turns out to be really interesting.
Here’s an IBM card sorter (probably a type 083 from the 1950s). It is sorting punch cards into 10 piles based on a particular digit (units digit, tens’ digit, etc.) The operator can specify which digit/column to sort on by turning a knob. youtube.com/watch?v=jJH2al…
Suppose each card has a 3 digit number, and we do 3 passes through the machine — first sorting the unit digit, then tens, then hundreds. After each pass we collect the cards from the piles in order. Voila — the cards are now numerically ordered! This is the radix sort algorithm.
The sorter is an electro-mechanical system. It has no electronics. The human and machine together execute algorithms to perform computations. The machine is only directly capable of sorting-as-in-categorizing, but we can use it for sorting-as-in-ordering. Elegant!
@random_walker Isn’t it sufficient to sort by hundredths place?