@@ -0,0 +1,853 @@
+package algorithms.countingsortthree;%0A%0Aimport java.util.Scanner;%0A%0Apublic class Solution %7B%0A%0A    private static Scanner scanner;%0A%0A    public static void main(String%5B%5D args) %7B%0A        scanner = new Scanner(System.in);%0A        int n = scanner.nextInt();%0A        %0A        int numberCount%5B%5D = new int%5B100%5D;%0A        %0A        for (int i = 0; i %3C= n; i++) %7B%0A            String%5B%5D words = scanner.nextLine().split(%22 %22);%0A            if (!words%5B0%5D.equals(%22%22)) %7B%0A                int number = Integer.parseInt(words%5B0%5D);%0A                numberCount%5Bnumber%5D += 1;%0A            %7D%0A        %7D%0A        %0A        int sum = 0;%0A        %0A        for (int i = 0; i %3C numberCount.length; i++) %7B%0A            sum = 0;%0A            for (int j = 0; j %3C= i; j++)%0A                sum += numberCount%5Bj%5D;%0A%0A            System.out.print(sum + %22 %22);%0A        %7D%0A        scanner.close();%0A%0A    %7D%0A%0A%7D

counting sort 3