Selection sort

2 Comments

C++ program to implement Selection sort using class

#include <iostream.h> const int MAX = 10 ; class array { private : int arr[MAX] ; int count ; public : array( ) ; void add ( int item ) ; void sort( ) ; void display( ) ; } ; array :: array( ) { count = 0 ; for ( int i = […]

1 Comment

Sorting of numbers

Sorting means arranging a set of data in some order. There are different methods that are used to sort the data in ascending order. Some of the  methods are Selection sort Bubble sort Insertion sort 1. Selection sort Here, to sort the data in ascending order, the 0th element is compared with all other elements. […]