Class MergeSort<T>
A merge sort implementation.
Namespace: Advanced.Algorithms.Sorting
Assembly: Advanced.Algorithms.dll
Syntax
public class MergeSort<T> : object where T : IComparable
Type Parameters
Name | Description |
---|---|
T |
Methods
Sort(T[], SortDirection)
Time complexity: O(nlog(n)).
Declaration
public static T[] Sort(T[] array, SortDirection sortDirection = null)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | |
SortDirection | sortDirection |
Returns
Type | Description |
---|---|
T[] |