3 ms·
This is doable, but the risk is that looking at the numbers might take longer than just sorting them, even with a sub optimal algorithm. I guess someone will j
by xyproto 6y ago
This is doable, but the risk is that looking at the numbers might take longer than just sorting them, even with a sub optimal algorithm.
I guess someone will just have to try this.
- cheez 6y agoHere is what a human did: It begins with quicksort, it switches to heapsort when the recursion depth exceeds a level based on (the logarithm of) the number of elements being sorted and it switches to insertion sort when the number of elements is below some threshold. I think machines can do this too.