News for hackers. Stuff that matters.
Re:Big-O Algorithm Complexity Cheat Sheet by anonymouz on Saturday May 04, 2013 @11:11AM (#5655133)
I suppose the general idea for the colors is something like: green = best in category, red = worst in category, yellow = neither best nor worst?

In that case bubble sort and insertion sort should be green for the best-case time complexity ( O(n) vs. O(n log(n)) for quicksort/mergesort).

It might also be interesting to make the plot dynamic and allow the visitor to play with different implicit constants for the individual asymptotic bounds.

Re:Big-O Algorithm Complexity Cheat Sheet by agf on Saturday May 04, 2013 @12:09PM (#5655301)
They've got the tables on github and I threw up a pull request to fix several color problems w/ the sorting table including this one, and also to add heapsort.
Re:Big-O Algorithm Complexity Cheat Sheet by pbiggar on Saturday May 04, 2013 @01:50PM (#5655651)
When reading it, I felt that red was "don't use in production", green was "fine to use in production" and yellow was "maybe use in production".
Re:Big-O Algorithm Complexity Cheat Sheet by sbov on Saturday May 04, 2013 @02:18PM (#5655765)
Except insertion sort is faster than quicksort for smaller N because of the overhead involved in quicksort - quicksort has large constants which big-O notation isn't designed to show. This is why many library sorting algorithms fall back to insertion once the things you are sorting gets small enough.
Re:Big-O Algorithm Complexity Cheat Sheet by pbiggar on Saturday May 04, 2013 @02:30PM (#5655808)
All "don't use in production" tags should be accompanied by "unless you really know what you're doing".
Re:Big-O Algorithm Complexity Cheat Sheet by Zarel on Sunday May 05, 2013 @12:10AM (#5657414)
It seems to be just:

O(1) green O(log n) green O(n) red O(n log n) yellow O(n^2) red

Which is weird, since green-green-red-yellow-red is a really confusing order. I don't know why they did it that way.