Talk:Sorting algorithms/Sleep sort: Difference between revisions

From Rosetta Code
Content added Content deleted
(a query on task requirement. -- ~~~~)
Line 3: Line 3:
Sleep gives a minimum duration to sleep, but not a maximum. This algorithm would thus sort incorrectly on a heavily loaded system. I cannot see a way to design a way around this without cheating on the algorithm. --[[User:Rdm|Rdm]] 15:14, 22 June 2011 (UTC)
Sleep gives a minimum duration to sleep, but not a maximum. This algorithm would thus sort incorrectly on a heavily loaded system. I cannot see a way to design a way around this without cheating on the algorithm. --[[User:Rdm|Rdm]] 15:14, 22 June 2011 (UTC)
:This is kinda just for fun. I wouldn't worry too much about it. --[[User:Mwn3d|Mwn3d]] 15:31, 22 June 2011 (UTC)
:This is kinda just for fun. I wouldn't worry too much about it. --[[User:Mwn3d|Mwn3d]] 15:31, 22 June 2011 (UTC)

==task query==

Why the requirement that the integers be non-negative?
Does this mean the programs should check if any integers are non-negative?
What if the program can handle negative integers?
Negative numbers aren't that much of a strange animal to be sorted, and I can't see that any programmer will strain their back coding for such beasts. The little I know of most programmers, weak of back, strong of mind. -- [[User:Gerard Schildberger|Gerard Schildberger]] 19:02, 2 June 2012 (UTC)

Revision as of 19:02, 2 June 2012

Designing for failure?

Sleep gives a minimum duration to sleep, but not a maximum. This algorithm would thus sort incorrectly on a heavily loaded system. I cannot see a way to design a way around this without cheating on the algorithm. --Rdm 15:14, 22 June 2011 (UTC)

This is kinda just for fun. I wouldn't worry too much about it. --Mwn3d 15:31, 22 June 2011 (UTC)

task query

Why the requirement that the integers be non-negative?

Does this mean the programs should check if any integers are non-negative?

What if the program can handle negative integers?

Negative numbers aren't that much of a strange animal to be sorted, and I can't see that any programmer will strain their back coding for such beasts. The little I know of most programmers, weak of back, strong of mind. -- Gerard Schildberger 19:02, 2 June 2012 (UTC)