@@ -0,0 +1,2349 @@
+import java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0A// https://www.hackerrank.com/challenges/angry-professor/problem%0Apublic class AngryProfessor %7B%0A%0A    private static final String SPACE = %22 %22;%0A%0A    private class Case %7B%0A        private final int totalStudents;%0A        private final int minStudentsOnTime;%0A        private final int%5B%5D arrivals;%0A%0A        public Case(int totalStudents, int minStudentsOnTime, int%5B%5D arrivals) %7B%0A            this.totalStudents = totalStudents;%0A            this.minStudentsOnTime = minStudentsOnTime;%0A            this.arrivals = arrivals;%0A        %7D%0A%0A        private int getStudentsOnTime() %7B%0A            int studentsOnTime = 0;%0A            for (int arrival : arrivals) %7B%0A                studentsOnTime += (arrival %3C= 0) ? 1 : 0;%0A            %7D%0A            return studentsOnTime;%0A        %7D%0A%0A        String classWillBeCancelled() %7B%0A            int studentsOnTime = getStudentsOnTime();%0A            return (studentsOnTime %3E= minStudentsOnTime) ? %22NO%22 : %22YES%22;%0A        %7D%0A    %7D%0A%0A    private Case readCase(BufferedReader reader) throws IOException %7B%0A        String%5B%5D split = reader.readLine().split(SPACE);%0A        int totalStudents = Integer.parseInt(split%5B0%5D);%0A        int minStudentsOnTime = Integer.parseInt(split%5B1%5D);%0A        String%5B%5D arrivalsStr = reader.readLine().split(SPACE);%0A        int%5B%5D arrivals = Arrays.stream(arrivalsStr).mapToInt(Integer::parseInt).toArray();%0A        return new Case(totalStudents, minStudentsOnTime, arrivals);%0A    %7D%0A%0A    private List%3CCase%3E readCases() throws IOException %7B%0A        List%3CCase%3E cases = new ArrayList%3C%3E();%0A        try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) %7B%0A            int totalCases = Integer.parseInt(reader.readLine());%0A            for (int i = 0; i %3C totalCases; i++) %7B%0A                Case inputCase = readCase(reader);%0A                cases.add(inputCase);%0A            %7D%0A        %7D%0A        return cases;%0A    %7D%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        AngryProfessor angryProfessor = new AngryProfessor();%0A        List%3CCase%3E cases = angryProfessor.readCases();%0A        for (Case inputCase : cases) %7B%0A            System.out.println(inputCase.classWillBeCancelled());%0A        %7D%0A    %7D%0A%7D%0A

Add solution for Angry Professor problem.