Main function to implement radix sort
| 41 | |
| 42 | // Main function to implement radix sort |
| 43 | void radixsort(int array[], int size) { |
| 44 | // Get maximum element |
| 45 | int max = getMax(array, size); |
| 46 | |
| 47 | // Apply counting sort to sort elements based on place value. |
| 48 | for (int place = 1; max / place > 0; place *= 10) |
| 49 | countingSort(array, size, place); |
| 50 | } |
| 51 | |
| 52 | // Print an array |
| 53 | void printArray(int array[], int size) { |
no test coverage detected