3 ms·
https://en.wikipedia.org/wiki/Timsort https://en.wikipedia.org/wiki/Timsort > In the worst case, Timsort takes O(n logn) comparisons to sort an array of n elem
by dalke 6y ago
https://en.wikipedia.org/wiki/Timsort https://en.wikipedia.org/wiki/Timsort
> In the worst case, Timsort takes O(n logn) comparisons to sort an array of n elements. In the best case, which occurs when the input is already sorted, it runs in linear time, meaning that it is an adaptive sorting algorithm.