Given a list of elements, perform an insertion sort on the elements with
the IComparer<(Of <(T>)>). Sort(Comparison<(Of <(T>)>))
performs a non-stable sort, which is why this class and method exists to
provide a stable sort algorithm.
Namespace:
Endeca.Web.Url.Seo.UtilityAssembly: Endeca.Web.Url.Seo (in Endeca.Web.Url.Seo.dll) Version: 2.1.3.0 (2.1.3.622)
Syntax
C# |
---|
public static List<T> InsertionSort( List<T> list, IComparer<T> compare ) |
Visual Basic (Declaration) |
---|
Public Shared Function InsertionSort ( _ list As List(Of T), _ compare As IComparer(Of T) _ ) As List(Of T) |
Visual C++ |
---|
public: static List<T>^ InsertionSort( List<T>^ list, IComparer<T>^ compare ) |
Parameters
- list
- Type: System.Collections.Generic..::.List<(Of <(T>)>)
List to sort.
- compare
- Type: System.Collections.Generic..::.IComparer<(Of <(T>)>)
Comparator by which to order the list.