@@ -0,0 +1,1934 @@
+import java.io.*;%0Aimport java.util.*;%0A%0A// https://www.hackerrank.com/challenges/countingsort3%0Apublic class CountingSort3 %7B%0A%0A    private Integer%5B%5D getNumbersArray() throws IOException %7B%0A        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));%0A        int lines = Integer.parseInt(br.readLine());%0A        Integer%5B%5D numbers = new Integer%5Blines%5D;%0A        for (int i = 0; i %3C lines; i++) %7B%0A            String%5B%5D splitArray = br.readLine().split(%22 %22);%0A            numbers%5Bi%5D = Integer.parseInt(splitArray%5B0%5D);%0A        %7D%0A        br.close();%0A        return numbers;%0A    %7D%0A%0A    private Map%3CInteger, Integer%3E getNumberFrequencyMap(Integer%5B%5D numbers) %7B%0A        int zero = 0;%0A        Map%3CInteger, Integer%3E numberFrequencyMap = new Hashtable%3C%3E();%0A        for (Integer number : numbers) %7B%0A            Integer frequency = numberFrequencyMap.getOrDefault(number, zero);%0A            frequency++;%0A            numberFrequencyMap.put(number, frequency);%0A        %7D%0A        return numberFrequencyMap;%0A    %7D%0A%0A    private String getCounterNumberFrequencyString(Map%3CInteger, Integer%3E numberFrequencyMap) %7B%0A        String counterNumberFrequency = %22%22;%0A        int zero = 0;%0A        int counter = 0;%0A        int limit = 100;%0A        for (int i = 0; i %3C limit; i++) %7B%0A            Integer frequency = numberFrequencyMap.getOrDefault(i, zero);%0A            counter += frequency;%0A            counterNumberFrequency += counter + %22 %22;%0A        %7D%0A        return counterNumberFrequency.trim();%0A    %7D%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        CountingSort3 countingSort3 = new CountingSort3();%0A        Integer%5B%5D numbers = countingSort3.getNumbersArray();%0A        Map%3CInteger, Integer%3E numberFrequencyMap = countingSort3.getNumberFrequencyMap(numbers);%0A        String counterNumberFrequency = countingSort3.getCounterNumberFrequencyString(numberFrequencyMap);%0A        System.out.println(counterNumberFrequency);%0A    %7D%0A%7D

Solve the counting sort 3 problem.