Selection SortΒΆ

Global Algorithm - One-Dimensional Algorithm

Selection Sort algorithm is a simple sorting algorithm that is unsuitable for sorting data list of large size. Its complexity is \(O(n^2)\) and it has performance advantage when auxiliary memory is limited.

Input Parameters

Parameter Type Constraint Description Remarks
\(Y\) \(Y \in \mathbb R^N\) \(N \in \mathbb{N}\)    

Output Parameters

Parameter Type Constraint Description Remarks
\(\hat{Y}\) \(\hat{Y} \in \mathbb R^N\) \(N \in \mathbb{N}\) Sorted data sequence of length \(N\) The output result is sensitive to improper values such as ‘nan’, ‘inf’, ‘null’, etc.

Single Steps using the Algorithm

References

  • D. Knuth, The Art of Computer Programming, vol. 3: Sorting and Searching, 3rd Edition, Addison-Wesley, 1997.