Перепрохожу курс заново спуся 3 года. Примет ли валидатор такое решение. я сделал без HashMap.
package com.javarush.task.task18.task1804;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;/*
Самые редкие байты
*/

public class Solution {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        FileInputStream inputStream = new FileInputStream(reader.readLine());
        reader.close();
        List<Integer> arraybyte =new ArrayList<>();
        while (inputStream.available() > 0){
            arraybyte.add(inputStream.read());
        }
        inputStream.close();
        List<Integer> equalByte = new ArrayList<>();
        //System.out.println(arraybyte);
        for (int i = 0; i < arraybyte.size()  ; i++) {
            int count = 0;
            for (int j = 0; j <arraybyte.size() ; j++) {
                if (!arraybyte.get(i).equals(arraybyte.get(j))) {

                    count++;
                }
            }
            equalByte.add(count);

        }

        //System.out.println(equalByte);
        int min = 0;
        for (int i = 0; i < equalByte.size(); i++) {
            if (min < equalByte.get(i))
                min = equalByte.get(i);
        }
        //System.out.println(min);

        for (int i = 0; i < arraybyte.size(); i++ ){
            if (equalByte.get(i).equals(min))
                System.out.print(arraybyte.get(i) + " ");
        }
    }
}