Selection sort is a sorting algorithm using with we can sort the array in increasing or decreasing order.
Selection sort is a sorting technique where we find the smallest number in an array and exchange it with first element.
And then we find second smallest element in the array and exchange it with second location element.
We continue this process till n-1 times.
After n-1 pass we get the sort array.
The time complexity of Selection sort is O(n2).
And it requires n-1 number of swaps.
Written with ♥ from Mangesh.
|1||C program sort array using Bubble Sort technique.|
|2||C program for sorting an array using Insertion Sort technique.|
|3||C program to sort an array using Selection Sort technique.|