IJCATR Volume 5 Issue 11

A Few Improvements for Selection Sort Algorithm

Prof. T.S.V. Mani S. Divyaa Devi Dr. S. Sakthivel
10.7753/IJCATR0511.1008
keywords : Selection Sort, Algorithm, Comparison, Exchange

PDF
Sorting refers to arranging data in a particular format. In this paper three modifications for the selection sort algorithm are presented. The modifications are mainly based on the programming methodologies used. In the first algorithm smallest and biggest element are found out in a single loop and exchanging first element with the smallest and last element with the biggest. This is repeated for all the elements. In the second algorithm first smallest and second smallest element are found out in a single loop and these values are moved as the first two elements. This is repeated for the rest of the elements. In the third algorithm first biggest and second biggest element are found out in a single loop and these are carried to the last positions. This is repeated for the remaining elements. The advantages of the modifications are then analyzed.
@artical{p5112016ijcatr05111008,
Title = "A Few Improvements for Selection Sort Algorithm",
Journal ="International Journal of Computer Applications Technology and Research(IJCATR)",
Volume = "5",
Issue ="11",
Pages ="721 - 724",
Year = "2016",
Authors ="Prof. T.S.V. Mani S. Divyaa Devi Dr. S. Sakthivel"}
  • This paper proposes a better three algorithms for selection sort.
  • First algorithm finds the first smallest and the first biggest element in a single loop and exchanging first element with the smallest and last element with the biggest.
  • Second algorithm finds the first smallest and the second smallest element in a single loop and exchanging first element with the first smallest and the second element with the second smallest element
  • Third algorithm finds the first biggest and the second biggest element in a single loop and exchanging the first element with the first biggest and the second element with the second biggest.