The funny thing is, sleep sort still has a complexity proportional to input size of O(n) (or big-theta(n)) because you only iterate through the input once.

One of the situations where this would fail is when the number of input values is really big and small numbers appear at the end of the input:

1,2,3,4,………….,1

So executing sleep sort on a computer might take longer than 2 units of time to “get to” the last 1 in the list, at which point it already has displayed the number 2. Of course, this is machine dependent and probably wouldn’t even factor into a “proper” complexity analysis

]]>./sleepSort 0.001 0.0011 0.00011 0.0001

0.001

0.00011

0.0001

0.0011

./sleepSort 0.001 0.0011 0.00011 0.0001

0.001

0.0011

0.00011

0.0001