next up previous
Next: Partition Up: CSE 2320: Algorithms and Previous: Pseudocode

Partitioning the Array

1.
Pick as the pivot
2.
Move from to looking for an element $\leq$ pivot
3.
Move from to looking for an element $\geq$ pivot
4.
Swap the two elements
5.
Repeat until pointers cross



Copyright © 1998 The University of Texas at Arlington