Created
May 23, 2014 09:32
-
-
Save maxfunke/d4a275f3430baf66fa27 to your computer and use it in GitHub Desktop.
Recursive QuickSort Algorithm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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