Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void myQuick(int[] tab, int left, int right)
- {
- int s = (left + right) / 2;
- int pivot = tab[s];
- swap(tab, s, right);
- int b = left;
- for(int a=left;a<right;a++)
- {
- if(tab[a]<=pivot)
- {
- swap(tab, a, b);
- b++;
- }
- }
- swap(tab, b, right);
- myQuick(tab, left, b - 1);
- myQuick(tab, b + 1, right);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement