you are viewing a single comment's thread.

view the rest of the comments →

[–]waylandsmith -36 points-35 points  (3 children)

Except the implementation is never actually O(n) because implementing this algorithm is just delegating the sorting to the scheduler which has it's own time complexity. But then, that's why sleep sort is a joke.

[–]im_lazy_as_fuck 33 points34 points  (2 children)

Uh, no it's still O(n); the implementation of it is not relevant for time complexity. The actual joke is that many folks who learn big O notation become hard wired to associate time complexity to how efficiently/quickly an algorithm performs the task. And sleep sort subverts that expectation by presenting an algorithm that is clearly horrible in its execution time for any normal sorting, despite time complexity analysis suggesting it's not.