Divide method of sorting records or numbers

Br. Sukumar


To sort a list of numbers there are few methods whereas the Divide and sort method at first divides the list of numbers into three groups rather two arrays and a variable. The numbers are compared with respect to the first element. The numbers lesser to the first element are kept in an array. The greater numbers are kept in a separate array and the numbers which are equal to the first element are counted and the value is set in a variable. Now the two arrays are sorted separately by any other method. Now the lists are merged accordingly, list of lesser numbers are kept first, then the numbers which are equal to first element are kept and then the numbers which are greater than the first element are kept after it. Then the list is printed or kept in an array of variables. As the numbers are divided before sorting the method is named as “Divide and Sort” method. The complexity of this process is 1/3rd of other methods of quadratic running time. Best case is when all the numbers are same. That case can be checked by this method.



Keywords: divide and sort method, time complexity, sorting method, sorting cost, three variables

Full Text:


DOI: https://doi.org/10.26483/ijarcs.v2i4.592


  • There are currently no refbacks.

Copyright (c) 2016 International Journal of Advanced Research in Computer Science