The main function that implements QuickSort arr[] --> Array to be sorted, low --> Starting index, high --> Ending index */
| 39 | low --> Starting index, |
| 40 | high --> Ending index */ |
| 41 | void quickSort(int arr[], int low, int high) |
| 42 | { |
| 43 | if (low < high) { |
| 44 | /* pi is partitioning index, arr[p] is now |
| 45 | at right place */ |
| 46 | int pi = partition(arr, low, high); |
| 47 | |
| 48 | // Separately sort elements before |
| 49 | // partition and after partition |
| 50 | quickSort(arr, low, pi - 1); |
| 51 | quickSort(arr, pi + 1, high); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /* Function to print an array */ |
| 56 | void printArray(int arr[], int size) |