Question: Below is the algorithm of counting sort for i 1 to k do C[i] +0 for j - 1 to n do C[4]]C[AU]] +
Below is the algorithm of counting sort for i 1 to k do C[i] +0 for j - 1 to n do C[4]]C[AU]] + 1 for i +2 to k do C[i] for j + n downto 1 C[i]+ C[i-1] do B[C[A[j]]]A[j] C[AU]] - C[A]] - 1 Show array B and C after counting sort finishes on Array A = [19, 6, 10, 7, 16, 17, 13, 14, 12, 9] and A[j] = {1, 2, . 19} (i.e. k = 19).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
