You are viewing a single comment's thread. Return to all comments →
the C code 😁😎
int* breakingRecords(int scores_count, int* scores, int* result_count) { int tmp=0,tmp1=0,high=0,min=0; tmp=scores[0]; tmp1=scores[0]; for(int i=0;i<scores_count;i++) { if(scores[i]>tmp) { high++; tmp=scores[i]; } if(scores[i]<tmp1) { min++; tmp1=scores[i]; } } tmp=2; scores[0]=high; scores[1]=min; *result_count=tmp; return scores; }
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 →
the C code 😁😎