You are viewing a single comment's thread. Return to all comments →
hi all could someone spot the logic mistake in my code??
int* compareTriplets(int a_count, int* a, int b_count, int* b, int* result_count) { result_count[0]=0; result_count[1]=0; for(int i = 0;i <= a_count;++i) { if(a[i]>b[i]) //6>5 { result_count[0]++; } else if(a[i]<b[i]) //7<10 { result_count[1]++; } } return result_count; }
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
hi all could someone spot the logic mistake in my code??