Index sort algorithm for positive integers

Sunday Eric Adewumi · Science World Journal · 2010

Sorting algorithms have been described variously by (Hubbard, 2000; Lipchutz, 2002).Sorting is required in database application to arrange items in either ascending or descending order of magnitude.It is sometimes required to determine the magnitude of a number say the ages of persons, census data, budgetary figures etc.In all these cases, sorting may be used to achieve the arrangement in order of magnitude.The applications of sorting algorithm are numerous and cannot be exhausted in this paper.An efficient algorithm will provide better sorting time and easy of implementation.We described some popular sorting algorithm of interest, the purpose of which is to provide bases for comparison with our method.Bubble sort Suppose we have a list of numbers denoted by a1, a2, …, an an in memory.Bubble sort algorithm proceeds through a sequence of iterations, each time moving the next largest item into its correct position.During each iteration, pair of consecutive elements are compared in order to move the larger element up.The complexity of bubble sort is naturally determined by the number of comparison experienced during each pass, (Lipschtz, 2002).Therefore in the first pass we have n-1 comparisons, second pass n-2 comparisons and son on.Thus the complexity of bubble sort is

Read the paper · More papers on PaperTik