You are viewing a single comment's thread. Return to all comments →
Java Solution
public static List<Integer> breakingRecords(List<Integer> scores) { int max=scores.get(0),min=scores.get(0),minCount=0,maxCount=0; for(int x : scores){ if(x>max){ max=x; maxCount++; } if(x<min){ min=x; minCount++; } } List<Integer> resultList = new ArrayList<>(); resultList.add(maxCount); resultList.add(minCount); return resultList; }
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 →
Java Solution