• + 0 comments
    public static List<Integer> breakingRecords(List<Integer> scores) {
            int max, min, low = 0, high = 0;
            max = min = scores.get(0);
            for (Integer score : scores) {
                if (score > max) {max = score; high++;}
                if (score < min) {min = score; low++;}
            }
            return Arrays.asList(high, low);
        }