Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 601 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 601 Bytes

Selection Sort

How it works

Simply at each step it is found out where the smallest number in the array is located. By replacing this number with the number at the beginning of the series, the smallest numbers are selected and thrown to the beginning.

Algorithm

  • It can be implemented as a stable sort
  • Method Selection

Complexity

The complexity of this algorithm is O(n2), because n numbers are processed at each step, and this process is repeated n times.

Type Big(O)
Worst O(n2)
Average O(n2)
Memory O(1)

Advantages

Disadvantages

Where is it used