Java Applets Centre
Quick Sort


Description
This applet demonstrates the working of the Quick Sort algorithm.


Code

void quickSort(int left, int right){
  int p=right;
  if(left >= right) return;
  if(size <= 20) display(left,right,p);
  p=partition(left, right);
  quickSort(left,p-1);
  quickSort(p+1,right);
}


Data Structures and Algorithms
Java Applets Centre


R. Mukundan
Department of Computer Science
University of Canterbury
Private Bag 4800, Christchurch
New Zealand.