International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 110 - Number 5 |
Year of Publication: 2015 |
Authors: J. B. Hayfron-acquah, Obed Appiah, K. Riverson |
10.5120/19314-0774 |
J. B. Hayfron-acquah, Obed Appiah, K. Riverson . Improved Selection Sort Algorithm. International Journal of Computer Applications. 110, 5 ( January 2015), 29-33. DOI=10.5120/19314-0774
One of the basic problems of Computer Science is sorting a list of items. It refers to the arrangement of numerical or alphabetical or character data in statistical order. Bubble, Insertion, Selection, Merge, and Quick sort are most common ones and they all have different performances based on the size of the list to be sorted. As the size of a list increases, some of the sorting algorithm turns to perform better than others and most cases programmers select algorithms that perform well even as the size of the input data increases. As the size of dataset increases, there is always the chance of duplication or some form of redundancies occurring in the list. For example, list of ages of students on a university campus is likely to have majority of them repeating. A new algorithm is proposed which can perform sorting faster than most sorting algorithms in such cases. The improved selection sort algorithm is a modification of the existing selection sort, but here the number of passes needed to sort the list is not solely based on the size of the list, but the number of distinct values in the dataset. This offers a far better performance as compared with the old selection sort in the case where there are redundancies in the list.