AN ALGORITHM OF TWO-WAY PASSED AND STABLY QUICK SORT (TPQA)
In this paper, an algorithm for sorting data is studied. For large data, due to huge repeated exchanges and comparisons of TPBEA, time complexity of the algorithm is much high. Hence, for improvement, an algorithm of two-way passed and stably quick sort is given by using the auxiliary-sort array. For fragment-sequential data, the efficiency of the given algorithm is higher than that of Shell’s sort, quick sort and heap sort, and for general data, when the effective length of the auxiliary-sort array is about by the theoretical and experimental work, the given algorithm takes relatively low time, and has approximately an average of comparisons and of exchanges. Moreover, the time complexity of the algorithm is much lower than that of bubble sort, selection sort and insertion sort, and is close to that of those unstable sorts, like quick sort, Shell’s sort and heap sort.
quick sort, stability, two-way passed, binary-search algorithm, auxiliary-sort array.