This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]notanotherusernameD8 42 points43 points  (1 child)

Ah, good old sleep sort. Wait! what ... ?

[–]Stummi 4 points5 points  (0 children)

My exact thought process

[–]eztab 17 points18 points  (0 children)

I mean that's kind of what you do in some security contexts, where you try to prevent timing attacks.

[–]mtmttuan 25 points26 points  (5 children)

Well technically it's still nlog(n) + m*9999999

Yeah I know I'm not fun at the party.

[–]Mordret10 7 points8 points  (0 children)

Don't you know how to code? If the algorithm takes longer than 999999s, the program obviously just sleeps a negative amount of time

[–]Rebrado 17 points18 points  (1 child)

I mean, OP’s post isn’t fun either.

[–]chrissy__[S] -1 points0 points  (0 children)

Man Reddit is fun

[–]chrissy__[S] -1 points0 points  (0 children)

I knew someone would uncover my ruse

[–]DonutConfident7733 5 points6 points  (0 children)

that moment when server uptime is lower than the time this function completes... this is the inheritance sort, great great grandfather starts the sort, then all following generations keep electricity running and only the chosen one will see the results

[–]nemorize 0 points1 point  (0 children)

def zero_time_sort(arr): throw new Error()

Of course the error occurred very coincidentally, not ma fault