Question: change all the for loops to while loop public int[] CountingSort (Container arr]) //The output array that will have sorted array// int output []- new
change all the for loops to while loop ![change all the for loops to while loop public int[] CountingSort (Container](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2f571ec90f_57766f2f57198645.jpg)
![arr]) //The output array that will have sorted array// int output []-](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2f572b0b1e_57866f2f572424ad.jpg)
public int[] CountingSort (Container arr]) //The output array that will have sorted array// int output []- new int[arr.length]: int max-arrI0].getKey) for (int i-1: i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
