3 ms·
According to this definition, the "random tail" test data is not "mostly sorted".
by chkas 7y ago
According to this definition, the "random tail" test data is not "mostly sorted".
- seanhunter 7y agoWell you could extend the definition to allow a small number of items which are entirely out of place. The point is that the right sort algorithm depends a lot on tthe distribution of input data and how much you care about worst-case vs average case trade offs.