News for hackers. Stuff that matters.
Re:The tiniest C sort function? by jrockway on Tuesday January 12, 2010 @02:38PM (#1048293)
The tiniest sort in most other languages: "sort". And it probably runs in not-O(n2) time...
Re:The tiniest C sort function? by scott_s on Tuesday January 12, 2010 @02:53PM (#1048335)
C99 has a sort function that is a part of the standard library. Clearly, the point of the exercise is not calling a library function, but how most compactly one can express a sort algorithm.
Re:The tiniest C sort function? by ajross on Tuesday January 12, 2010 @03:14PM (#1048391)
Hey, cool. ANSI C89 has a sort function that is part of the standard library too! So does 3BSD! Small world. :)

I'm sure qsort() is older than even 3BSD, but that's the oldest source base I have sitting on this box.