61
[Request] Looking for resources on terrible algorithms, architecture, and design
(self.programmer_humor)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Technically, sleep sort is O(n), so faster than the theoretical optimal sorting algorithm O(n.log n) ... not so bad ;)
Sleep sort is kind of like count sort but with added overhead. Both have a complexity of O(n+m) with n being the length and m the value of the max element.
The optimum of O(n * log n) is based on the assumption that the only information about the values is obtained by comparison. If you operate on integer keys I would recommend radix sort. It has a complexity of O(n * w) where w is the length (read logarithm) of the key.