• + 0 comments

    public static List breakingRecords(List scores) {

       int max,min,m=0,n=0; max= min = scores.get(0);
        for (int i = 1; i < scores.size(); i++) {
            if (scores.get(i)>max){
                max = scores.get(i);
                m++;
            }else if (scores.get(i) <min){
                min = scores.get(i);
                n++;
            }
        }
        return  Arrays.asList(m,n);
    }