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);
}