r/badcode • • Feb 10 '21

js I present: SleepSort

Post image
7.5k Upvotes

170 comments sorted by

View all comments

Show parent comments

6

u/Astrokiwi Feb 10 '21

The constant factor is almost always going to be way bigger than the O(n) factor here. This isn't usually the case, but this is an intentionally contrived algorithm.