News for hackers. Stuff that matters.
Re:Lost skills: What today's coders don't know and why it ma... by Yeroc on Saturday August 06, 2011 @11:23AM (#2854030)
I'm curious why you'd choose an algorithm that on average takes O(n log n) comparisons with a O(n^2) worst case versus simply iterating O(n)?

Unless there are other requirements I don't see why you'd suggest sorting the elements.

Re:Lost skills: What today's coders don't know and why it ma... by bostonpete on Sunday August 07, 2011 @07:38PM (#2858125)
I certainly wouldn't choose that algorithm. I thought the correct solution was obvious enough that I could joke about it...