Timsort

Back to Hybrid

A hybrid sorting algorithm combining merge sort and insertion sort. Exploits natural runs (pre-sorted subsequences) in the data. The default sorting algorithm in Python and Java. O(n log n) worst case, O(n) best case, stable.

algorithms sorting timsort