(int arr[], int n)
| 7 | |
| 8 | // A utility function to get maximum value in arr[] |
| 9 | static int getMax(int arr[], int n) |
| 10 | { |
| 11 | int mx = arr[0]; |
| 12 | for (int i = 1; i < n; i++) |
| 13 | if (arr[i] > mx) |
| 14 | mx = arr[i]; |
| 15 | return mx; |
| 16 | } |
| 17 | |
| 18 | // A function to do counting sort of arr[] according to |
| 19 | // the digit represented by exp. |