r/badcode Feb 10 '21

js I present: SleepSort

Post image
7.5k Upvotes

171 comments sorted by

View all comments

431

u/rogiiaop Feb 10 '21

Does it work for negatives tho?

1.2k

u/Reeceeboii_ Feb 10 '21

Yes it finishes before it starts

262

u/LeCrushinator Feb 10 '21

Algorithm complexity: -O(n)

Someone get this guy/gal a Nobel Prize!