Skip to content

Instantly share code, notes, and snippets.

@maxfunke
Created May 23, 2014 09:32
Show Gist options
  • Save maxfunke/d4a275f3430baf66fa27 to your computer and use it in GitHub Desktop.
Save maxfunke/d4a275f3430baf66fa27 to your computer and use it in GitHub Desktop.
Recursive QuickSort Algorithm
void Quicksort(Vector<int> &v, int start, int stop) {
if(stop > start) {
int pivot = Partition(v, start, stop);
Quicksort(v, start, pivot-1);
Quicksort(v, pivot+1, stop);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment