You are viewing a single comment's thread. Return to all comments →
int* icecreamParlor(int m, int arr_count, int* arr, int* result_count) { *result_count=2; int* new_array=(int*)malloc(2*sizeof(int)); for(int i=0;i<arr_count;i++){ for(int j=i+1;j<arr_count;j++){ if(arr[i]+arr[j]==m){ new_array[0]=i+1; new_array[1]=j+1; } } } return new_array; }
Seems like cookies are disabled on this browser, please enable them to open this website
Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →