Sorting Algorithms, Datastrucutre, Algorithms, Leetcode, Leetcode Medium.
of occurrences in count[] for (int j : arr) { count[(j / exp) % 10]++; } // change count[i] so that count[i] now contains // actual position of this digit in output[] for (int i = 1; i < 10; i++) { count[i] += count[i - 1]; } for (int i = n - 1; i >= 0; i--) { output[count[(arr[i] / exp) % 10] - 1]