quick_sort-snippet.h 161 Bytes
Newer Older
1 2 3 4 5 6
void QuickSort(int* first, int* last) {
  if (last - first <= 1) return;
  int* mid = Partition(first, last);
  QuickSort(first, mid);
  QuickSort(mid, last);
}