3 ms·
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
by gizmo686 13y ago
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).
- mihai_ionic 13y agoI would't really count time passing as an operation, since other programs are able to run during that time.
- gweinberg 13y agoYou could keep it linear by first going through the list to find the max, then scaling down.