3 ms·
You could also go with radix sort (O(N)), since your insertion times are presumably some kind of integer.
by sterlind 7y ago
You could also go with radix sort (O(N)), since your insertion times are presumably some kind of integer.
- ww520 7y agoYes, radix is faster. But at that point I was looking for stability and simplicity over all else. Merge sort was stable and simple to implement, with decent performance.