Learn basic concept of c , c++ and python programming in regularcodes.com

Spread the post

C Selection sort

Time complexity of this program O(n^2)

Below in C implementation of this problem.

Accepted Output

Before Selection sort : 34, 13, 112, 63, 12, 32, 123, 456, 131, 46, 23, 121, 45

After Selection Sort

data is :12, 13, 23, 32, 34, 45, 46, 63, 112, 121, 123, 131, 456

Before Selection sort : 7, 22, 44, 11, 72, 31, 43, 67, 21, 35, 65, 23, 67, 11, 88, 42, 23

After Selection sort

data is : 7, 11, 11, 21, 22, 23, 23, 31, 35, 42, 43, 44, 65, 67, 67, 72, 88

Output
 Before sort data is : 7 22 44 11 72 31 43 67 21 35 65 23 67 11 88 42 23
 After sort data is: 7 11 11 21 22 23 23 31 35 42 43 44 65 67 67 72 88  

Spread the post