You are viewing a single comment's thread. Return to all comments →
public static List<Integer> breakingRecords(List<Integer> scores) { // Write your code here int minimun = scores.get(0); int maximun = scores.get(0); int min = 0; int max = 0; for (Integer integer : scores) { if (integer < minimun) { minimun = integer; min++; } if (integer > maximun) { maximun = integer; max++; } } Integer[] resultado = {max, min}; return Arrays.asList(resultado); }
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →