PPT Slide
public void Quicksort(int [ ] b, int h, int k) {
Bounds c [ ] = new Bounds [ k+1-h];
System.out.println(k);
System.out.println(h);
c[0]= new Bounds(h,k);
int i= 1;
// inv: b[h..k] is sorted iff all its subsegments
// defined by elements of c[0..i-1] are sorted
while (i > 0) {
i = i -1;
int f= c[i].f; int l= c[i].l;
// Process segment b[f..l]
Previous slide
Next slide
Back to first slide
View graphic version