Skip to content

Files

selection-sort

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 14, 2018
Jun 22, 2018
May 24, 2018

Selection Sort

Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and it has performance advantages over more complicated algorithms in certain situations, particularly where auxiliary memory is limited.

Algorithm Visualization

Algorithm Visualization

Complexity

time: worst O(n2), best O(n2), average O(n2)
space: O(1) auxiliary

References

Wikipedia