QuickSort algorithm */
| 48 | |
| 49 | /* QuickSort algorithm */ |
| 50 | static void quickSort(long long int array[], long long int first, long long int last) { |
| 51 | |
| 52 | if (last - first >= 1) { |
| 53 | |
| 54 | long long int pivotIndex = partition(array, first, last); |
| 55 | |
| 56 | quickSort(array, first, pivotIndex - 1); |
| 57 | quickSort(array, pivotIndex + 1, last); |
| 58 | |
| 59 | } |
| 60 | |
| 61 | } |
| 62 | |
| 63 | /* QuickSelect algorithm */ |
| 64 | static long long int quickSelect(long long int array[], long long int first, long long int last, long long int k) { |
no test coverage detected