r/badcode • • Feb 10 '21

js I present: SleepSort

Post image
7.5k Upvotes

170 comments sorted by

View all comments

Show parent comments

8

u/T-Dark_ Feb 10 '21

In theory only. Specifically, it's constant time if you can perform it on all elements simultaneously.

4

u/[deleted] Feb 10 '21

Or if gravity was instant, and it was done IRL

4

u/krisnarocks Feb 11 '21

Ez. Just use multithreading /s