Skip to content

Latest commit

 

History

History
 
 

selection_sort

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Selection Sort

It is a simple in-place comparison sorting algorithm. It is implemented by dividing the list into two parts, with first sublist that is built up with sorted items and second sublist that remains to be sorted. It derives its name from the process of selecting the smallest (or largest) item from unsorted list and putting it in sorted order by moving the elements.

Its worst-case complexity is O(n^2).

A graphical example of selection sort