We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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);
}
Cookie support is required to access HackerRank
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 →
public static List breakingRecords(List scores) {