You are viewing a single comment's thread. Return to all comments →
vector breakingRecords(vector scores){ int maxRecord=scores[0]; int minRecord=scores[0]; int maxCount=0, minCount=0; for(int i=1; imaxRecord) { maxRecord=scores[i]; maxCount++;
} else if(scores[i]<minRecord) { minRecord=scores[i]; minCount++; } } return {maxCount,minCount};
}
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 →
vector breakingRecords(vector scores){ int maxRecord=scores[0]; int minRecord=scores[0]; int maxCount=0, minCount=0; for(int i=1; imaxRecord) { maxRecord=scores[i]; maxCount++;
}