@@ -0,0 +1,1680 @@
+package algorithms.sorting;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/*%0D%0A * Challenge:%0D%0A * Given a list of integers, can you count and output the number of times each%0D%0A * value appears?%0D%0A * %0D%0A * Hint: There is no need to sort the data, you just need to count it.%0D%0A * %0D%0A * Input Format:%0D%0A * There will be two lines of input:%0D%0A * %0D%0A * n - the size of the list%0D%0A * ar - n space-separated numbers that make up the list%0D%0A * Output Format%0D%0A * Output the number of times every number from 0 to 99 (inclusive) appears on%0D%0A * the list.%0D%0A * %0D%0A * Constraints:%0D%0A * 100 %3C= n %3C= 106%0D%0A * 0 %3C= x %3C 100, x is an element of ar%0D%0A * %0D%0A * Sample Input: %0D%0A * 100%0D%0A * 63 25 73 1 98 73 56 84 86 57 16 83 8 25 81 56 9 53 98 67 99 12 83 89 80 91 39%0D%0A * 86 76 85 74 39 25 90 59 10 94 32 44 3 89 30 27 79 46 96 27 32 18 21 92 69 81%0D%0A * 40 40 34 68 78 24 87 42 69 23 41 78 22 6 90 99 89 50 30 20 1 43 3 70 95 33 46%0D%0A * 44 9 69 48 33 60 65 16 82 67 61 32 21 79 75 75 13 87 70 33%0D%0A * %0D%0A * Sample Output: %0D%0A * 0 2 0 2 0 0 1 0 1 2 1 0 1 1 0 0 2 0 1 0 1 2 1 1 1 3 0 2 0 0 2 0 3 3 1 0 0 0 0%0D%0A * 2 2 1 1 1 2 0 2 0 1 0 1 0 0 1 0 0 2 1 0 1 1 1 0 1 0 1 0 2 1 3 2 0 0 2 1 2 1 0%0D%0A * 2 2 1 2 1 2 1 1 2 2 0 3 2 1 1 0 1 1 1 0 2 2%0D%0A */%0D%0Apublic class CountingSort1 %7B%0D%0A%0D%0Apublic static void main(String%5B%5D args) %7B%0D%0A        %0D%0A        Scanner sc = new Scanner(System.in);%0D%0A        int listSize = sc.nextInt();%0D%0A        %0D%0A        int%5B%5D counts = new int%5BlistSize%5D;%0D%0A        %0D%0A        for (int i = 0; i %3C counts.length; i++) %7B%0D%0A            int num = sc.nextInt();%0D%0A            counts%5Bnum%5D++;%0D%0A        %7D%0D%0A        %0D%0A        for (int i = 0; i %3C 100; i++) %7B%0D%0A            System.out.print(counts%5Bi%5D + %22 %22);%0D%0A        %7D%0D%0A        sc.close();%0D%0A    %7D%0D%0A%7D

Add CountingSort1