Hey, I guess it's O(1)... So it must be good 
-
-
-
No it isn't. It's O(infinity)
- 6 more replies
New conversation -
-
-
very inefficient for the list: [1,2,3,9999999999]
-
Even for [1, 2, 3] is inefficient.
End of conversation
New conversation -
-
-
Is it only me who is irritated by the fact that "element" and "X" are never identified with each other in the algorithm? :P
-
No. Looked at it and asked 'who the hell is X?' Took me several seconds to realize X is each element.
End of conversation
New conversation -
-
-
I have an idea to make it faster. Change second to microsecond
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
As sorting algorithms go, the one described here is a really bad one. For one, it relies on a another algorithm to sort the wake up times. Second, timers on most computers have a resolution of about 50 milliseconds, so the sort would be quite inaccurate on top of being slow.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Interesting need for parallelism. The following will complete the sort sooner by a factor of N. (With some conditions on N such that the smallest element X(0)/N and [X(i+1) - X(i)]/N > duration of handling 1 & 2 otherwise errors may occur. 1. Sleep X/N seconds 2. Prints X
-
high potential for numerical error if max(list) is large
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.