78

Found on my university's computing soc page

Comments
  • 0
    Interesting but not particularly efficient.
  • 3
    Can't sort in reverse order.
  • 3
    @jryouk just make it sleep for a time inverse of the number (1/n)
  • 2
    With 100 numbers it should freeze your pc
  • 2
    @crisz that works if sleep accept sub second parameter.
  • 7
    This is actually a sort in O(n) 😮
  • 0
    I've got to favourite this. Practically genius!
  • 0
    I really liked the concept of sleep sort
  • 0
    @matanl haha. But the actual time taken is n seconds, too. Which sucks
  • 1
    @asgs Doesn’t always have to be. It can be any scaled unit of time. The count could be in ps if the system supports it.

    Practically, the problem would be with the delay caused due to running this loop and very small times arriving towards the end of a very very large array.
  • 1
    @r20408e122449d I was referring to the default unit of sleep command used in this script
Add Comment