Function to sort an array using quick sort algorithm.
| 21 | } |
| 22 | //Function to sort an array using quick sort algorithm. |
| 23 | void quickSort(int arr[], int start, int end) |
| 24 | { |
| 25 | // code here |
| 26 | if (start<end){ |
| 27 | int part = partition(arr,start,end); |
| 28 | quickSort(arr,start,part-1); |
| 29 | quickSort(arr,part+1,end); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | int partition (int arr[], int start, int end) |
| 34 | { |