Skip to main content
9 events
when toggle format what by license comment
Dec 3, 2010 at 10:46 history made wiki Post Made Community Wiki
Nov 11, 2010 at 10:16 comment added user1249 Hoare says "The item chosen [as pivot element]... should always be that which occupies the highest-addressed locations of the segment which is to be partitioned. If it is feared that this will have a harmfully non-random result, a randomly chosen item should initially be placed in the highest-addressed locations". So to be true to Hoare, we should work with the last element, not the first.
Nov 11, 2010 at 2:07 comment added Macneil Is there a version of this that uses a random pivot instead of the head of the list? That would make it closer to C.A.R. Hoare's original.
Nov 10, 2010 at 16:43 comment added user1249 Is part in the standard library? Been a while...
Nov 8, 2010 at 23:40 comment added Kendall Hopkins I like the partitioning alternative qsort (x:xs) = qsort lesser ++ equal ++ qsort greater where (lesser,equal,greater) = part x xs ([],[x],[])
Nov 7, 2010 at 8:14 history edited user1249 CC BY-SA 2.5
added 25 characters in body
Nov 7, 2010 at 1:00 comment added user1249 Haskell. I like the mindset of the language.
Nov 6, 2010 at 21:02 comment added Barry Brown This is Standard ML? Or Haskell?
Nov 6, 2010 at 20:02 history answered user1249 CC BY-SA 2.5