Selection Sort: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:
Selection sort scans the input array from left to right, determining the minimum elements in the subarray spanning from the current position to the end of the input array and then swap the current element with the minimum.  
Selection sort scans the input array from left to right, determining the minimum elements in the subarray spanning from the current position to the end of the input array and then swap the current element with the minimum.  


It is an [[Sorting_Algorithms#In-place|in-place]] sorting mechanism with a n<sup>2</sup> growth order
It is an [[Sorting_Algorithms#In-place|in-place]] sorting algorithm.

Revision as of 21:26, 6 August 2018

Internal

Overview

Selection sort scans the input array from left to right, determining the minimum elements in the subarray spanning from the current position to the end of the input array and then swap the current element with the minimum.

It is an in-place sorting algorithm.