Slashdot Mirror


Ask Slashdot: How Do You Sort?

camperdave writes "I was recently going through a pile of receipts and other papers to put them into order by date. Lacking one of those fancy sorting sticks they have at the office, I wound up with all sorts of piles and I was getting confused as to which pile was for what. Finally, it struck me: Why don't I use one of the many sorting algorithms I learned back in my computer science classes? So I swept all the papers back into the box and did a radix sort on them. It worked like a charm. Since then, I've had occasion to try quicksorts and merge sorts. So, when you have to physically sort things, what algorithm (if any) do you use?"

4 of 195 comments (clear)

  1. Ob xkcd by Geoffrey.landis · · Score: 5, Funny

    The obligatory xkcd

    --
    http://www.geoffreylandis.com
  2. Shredsort by Anonymous Coward · · Score: 5, Funny

    I find Shredsort to be the fastest.

    1. Re:Shredsort by Anonymous Coward · · Score: 5, Funny

      Hmm, that's O(n).

      Trashsort is O(1)

  3. My method by synaptik · · Score: 5, Funny

    I punch 3 holes in every receipt: one each for parent, left, and right. Then I attach them all by string, in a balanced tree. If I need multiple search keys, I just use different colors of string, and different sets of holes. Rebalancing can be a bit of a bitch, after insertion. (I never delete.)

    --
    HSJ$$*&#^!#+++ATH0
    NO CARRIER