next up previous
Next: Partitioning the Array Up: CSE 2320: Algorithms and Previous: Description

Pseudocode



Quicksort(A,p,r)
1
$\;\;\;\;\;$if p < r
2
$\;\;\;\;\;$then q = Partition(A,p,r)
3
$\;\;\;\;\;$ $\;\;\;\;\;$Quicksort(A,p,q)
4
$\;\;\;\;\;$ $\;\;\;\;\;$Quicksort(A,q+1,r)



Initial Call: Quicksort(A,1,length(A))



Copyright © 1998 The University of Texas at Arlington