MCPcopy Create free account
hub / github.com/bananabr/TimeException / quickSort

Function quickSort

trimmean.cpp:50–61  ·  view source on GitHub ↗

QuickSort algorithm */

Source from the content-addressed store, hash-verified

48
49/* QuickSort algorithm */
50static 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 */
64static long long int quickSelect(long long int array[], long long int first, long long int last, long long int k) {

Callers 1

slowTRIMMEANFunction · 0.85

Calls 1

partitionFunction · 0.85

Tested by

no test coverage detected