You are viewing a single comment's thread. Return to all comments →
Here's my C++ version:
vector<int> breakingRecords(vector<int> score) { int min=score[0]; int max=score[0]; vector<int> myreturn = {0,0}; for(int i=1;i<score.size();i++){ if(score[i]>max){ myreturn[0]+=1; max = score[i]; } else if(score[i]<min){ myreturn[1]+=1; min = score[i]; } } return myreturn; }
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 →
Here's my C++ version: