Class SelectionSort<T>
A selection sort implementation.
Inherited Members
Namespace: Advanced.Algorithms.Sorting
Assembly: Advanced.Algorithms.dll
Syntax
public class SelectionSort<T>
where T : IComparable
Type Parameters
| Name | Description |
|---|---|
| T |
Methods
Sort(T[], SortDirection)
Time complexity: O(n^2).
Declaration
public static T[] Sort(T[] array, SortDirection sortDirection = SortDirection.Ascending)
Parameters
| Type | Name | Description |
|---|---|---|
| T[] | array | |
| SortDirection | sortDirection |
Returns
| Type | Description |
|---|---|
| T[] |