International Journal of Information Sciences and Application.
ISSN 0974-2255 Volume 3, Number 1 (2011), pp. 25-30
© International Research Publication House
http://www.irphouse.com
An Efficient Quicksort using Value based Pivot
Selection an Bidirectional Partitioning
Runumi Devi and Vineeta Khemchandani
Department of Computer Applications, JSS Academy of Technical Education,
C-20/1Sector 62, Noida, Uttar Pradesh-201301, India
E-mail: runumi@jssaten.ac.in, vkemchandani@jssaten.ac.in
Abstract
Quick sort is generally considered to be the best internal sorting algorithm,
and is often used as a yardstick by which the efficiency of other sorting
algorithms is compared. It is, therefore essential that its performance is studied
thoroughly. This includes studying the worst case behaviour of the algorithm,
and especially when the algorithm is experimentally evaluated. The worst case
running time of quick sort algorithm is O(n2 ). This paper proposes a new
variant of quick sort, which reduces the running time of the algorithm to n
log(n). Two versions of the quick sort are being studied – the Classical quick
sort and the proposed one. A comparison is made in terms of running time
which is further established by mathematical analysis. The simulation result
shows that proposed algorithm is faster than Classical quick sort in the worst
case for sorting the same input data size.
Keywords: Quick sort, sorting, asymptotic, algorithm, in-place sorting.
Introduction
Sorting data is one of the most fundamental problems in Computer Science, especially
if the arranging objects are primitive ones, such as integers, bytes, floats, etc. Since
sorting methods play an important role in the operations of computer and other data
processing systems, there has been an interest in seeking new algorithms better than
the existing ones.
Donald Knuth [3] reports that “computer manufacturers of the 1960s estimated
that more than 25 percent of the running time on their computers was spent on sorting,
when all their customers were taken into account. In fact, there were many
installations in which the task of sorting was responsible for more than half of the
computing time..” As i expected, sorting is one of the most heavily studied problems