What sorting algorithm does .net use in IComparer

Does anyone know which sorting algorithm .net uses when we implement IComparerin our class?

+5
source share
3 answers

QuickSort seems to have this.

IComparer documentation says

This interface is used in conjunction with Array.Sort and Array.BinarySearch .

The Array.Sort documentation states

QuickSort. ; , , . , .

+9

MSDN,.NET QuickSort. , ( ), .NET , ?

+3

, Introsort, :

:

  • 16 ,

  • If the number of partitions exceeds 2 * LogN, where N is the range of the input array, it uses the Heapsort algorithm .

  • Otherwise, it uses the Quicksort algorithm .

    source here

+2
source

All Articles