The main function that implements QuickSort arr[] --> Array to be sorted, low --> Starting index, high --> Ending index */
| 96 | low --> Starting index, |
| 97 | high --> Ending index */ |
| 98 | void quickSort(std::vector<Edge*>& arr, int low, int high) |
| 99 | { |
| 100 | if (low < high) |
| 101 | { |
| 102 | /* pi is partitioning index, arr[p] is now |
| 103 | at right place */ |
| 104 | int pi = partition(arr, low, high); |
| 105 | |
| 106 | // Separately sort elements before |
| 107 | // partition and after partition |
| 108 | quickSort(arr, low, pi - 1); |
| 109 | quickSort(arr, pi + 1, high); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | ///////////////////////////////////////////////////////////////////////// |
| 114 | // |