You are viewing a single comment's thread. Return to all 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); }
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 →