All pastes #2072918 Raw Edit

Untitled

public c v1 · immutable
#2072918 ·published 2011-05-31 19:24 UTC
rendered paste body
void QuickSort(int tab[], int l, int r){ if (l>=r) return;  int ind=l;  for (int i=l+1;i<=r,i++) {  if (tab[i] < tab[l]) {    if (++ind != i)      int temp=tab[ind]; tab[ind]=tab[i]; tab[i]=temp;  } }  int temp=tab[l]; tab[l]=tab[ind]; tab[ind]=temp;  QuickSort(tab, l, ind-1); QuickSort(tab, ind+1, r);}