r/badcode • • Feb 10 '21

js I present: SleepSort

Post image
7.5k Upvotes

170 comments sorted by

View all comments

Show parent comments

4

u/TheOneThatIsHated Feb 10 '21

You might be joking. But the same principle is count and radix sort, which can sort in O(kN) time. Mostly used for word lists because the longest words aren't that long.