Selection Sort - Online Code

Description

The selection sort works by selecting the smallest unsorted item remaining in the list, and then swapping it with the item in the next position to be filled. The selection sort has a complexity of O(n2).Pros: Simple and easy to implement.Cons: Inefficient for large lists, so similar to the more efficient insertion sort that the insertion sort should be used in its place.

Source Code

/*---------------------------------------------------------------------------
	  PROGRAM TO SORT THE NUMBERS USING SELECTION SORT
---------------------------------------------------------------------------*/
#include<stdio.h
... (login or register to view full code)

To view full code, you must Login or Register, its FREE.

Hey, registering yourself just takes less than a minute and opens up a whole new GetGyan experience.




Comments

No comment yet. Be the first to post a comment.