| 43 | |
| 44 | |
| 45 | void Quick_sort(int *A,int low,int high){ |
| 46 | if(low<high){ //More than one element -base condition |
| 47 | int p=partition(A,low,high); |
| 48 | |
| 49 | Quick_sort(A,low,p-1); |
| 50 | Quick_sort(A,p+1,high); |
| 51 | |
| 52 | |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | void Print(int *A,int n){ |
| 57 | for (int i = 0; i < n; i++) |