Re:Trolling homework questions - sorting
by mihai_ionic on Friday December 27, 2013 @08:37PM
(#6973475)
And it even has the best time bound you can get for a comparison based sort. Most OS schedulers would use a heap/priority queue internally for timers, which makes sleep sort O(n log n).
[ Parent
| on HN ]
Re:Trolling homework questions - sorting
by gizmo686 on Friday December 27, 2013 @09:26PM
(#6973580)
wouldn't sleep sort be O(k), where k is the largest element to be sorted? (Assuming the clock and scheduler are precise enough to achieve the correct answer the first attempt).
Re:Trolling homework questions - sorting
by mihai_ionic on Friday December 27, 2013 @09:35PM
(#6973612)
I would't really count time passing as an operation, since other programs are able to run during that time.