Browse > Article
http://dx.doi.org/10.9708/jksci.2012.17.4.139

Quicksort Using Range Pivot  

Lee, Sang-Un (Dept. of Multimedia Science, Gangneung-Wonju National University)
Abstract
Generally, Quicksort selects the pivot from leftmost, rightmost, middle, or random location in the array. This paper suggests Quicksort using middle range pivot $P_0$ and continually divides into 2. This method searches the minimum value $L$ and maximum value $H$ in the length n of list $A$. Then compute the initial pivot key $P_0=(H+L)/2$ and swaps $a[i]{\geq}P_0$,$a[j]<P_0$ until $i$=$j$ or $i$>$j$. After the swap, the length of list $A_0$ separates in two lists $a[1]{\leq}A_1{\leq}a[j]$ and $a[i]{\leq}A_2{\leq}a[n]$ and the pivot values are selected by $P_1=P_0/2$, $P_2=P_0+P_1$. This process repeated until the length of partial list is two. At the length of list is two and $a$[1]>$a$[2], swaps as $a[1]{\leftrightarrow}a[2]$. This method is simpler pivot key process than Quicksort and improved the worst-case computational complexity $O(n^2)$ to $O(n{\log}n)$.
Keywords
Quicksort; Pivot; Divide-and-conquer strategy; Range;
Citations & Related Records
연도 인용수 순위
  • Reference
1 T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, "Introduction to Algorithms, Chapter 7. Quicksort", 2nd Ed., pp. 145-164, MIT Press, 2005.
2 D. B. Ring, "A Comparison of Sorting Algorithms", http://www.devx.com/vb2themax/Article/19900, 2003.
3 S. Nilson, "The Fastest Sorting Algorithm?", http://drdobs.com/architecture-and-design/184404062, Dr. Dobb's Journal, Vol. 311, pp. 38-45, 2000.
4 R. Sedgewick, "Algorithms in C, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching", 3rd Ed., Addison-Wesley, 1998.
5 Wikipedia, "Quicksort," http://en.wikipedia.org/ wiki/ Quicksort, 2011.