Introsort

Introsort is a sorting algorithm. The term is shorthand for " introspective Order ". The algorithm is a variation of Quicksort, which to a different sorting algorithms with worst-case running time (eg heapsort ) falls back in degenerate cases. To this end, each recursion level is decided based on an assessment function at the start whether an alternate algorithm to be used for sorting the parts list ( for example, when a certain recursion depth ).

In this way, the speed of quicksort is coupled with a worst-case time complexity, which in the near - is - compared to the case of pure Quicksort. Is quite attained the complexity in general not, or is still significantly different from this, because it is applied to relapse to the alternative sorting method quicksort with a quadratic worst-case time complexity.

Became known Introsort primarily by the fact that Silicon Graphics in its Standard Template Library for C for several years now relies on Introsort instead of quicksort. Meanwhile Introsort has also been adopted in other implementations of the C Standard Library, including the GCC. Currently Introsort considered as the fastest unstable sorting algorithm.

415420
de