How can Timsort beat the sort boundary O (n log n) at some point?

I heard that Timsort violates the O (n log n) restriction for some cases that take advantage of the data template. How is this possible? Can someone explain me in detail? If this is true, then Timsort will always take less comparison than quicksort because there is some pattern on real data, except that the data is really random?

Can we use some tricks to break the O (n log n) associated with the avg code to sort the sort?

+3
source share
1 answer

, . CS : , , โ€‹โ€‹ . , , , , , , be: . , . : , K1 , - timsort. K2(n), , , K2=Exp(-n), n . , , : , . , , . .

+4

All Articles