Quicksort without a stack
The standard Quicksort algorithm requires a stack of size O(log2n) to sort a set of n elements. We introduce a simple nonrecursive version of Quicksort, which requires only a constant, O(1) additional space because the unsorted subsets are searched instead of stacking their boundaries as in the standard Quicksort. Our O(1)-space Quicksort is probably the most efficient of all the sorting algorithms which need a constant workspace only.
KeywordsAlgorithm O(1)-space Quicksort Searching Sorting Stack
Unable to display preview. Download preview PDF.
- D. E. Knuth: The Art of Computer Programming, Vol. III: Sorting and Searching. Addison-Wesley Reading, MA, 2nd ed. 1975.Google Scholar
- R. Sedgewick: Implementing QUICKSORT Programs. Comm. ACM, Vol 21, No. 10, 1978, 847–856.Google Scholar
- B. Ďurian: Quicksort without a stack: Design and analysis. Unpublished, 1986.Google Scholar