You are viewing a single comment's thread. Return to all comments →
vector<int> icecreamParlor(int m, vector<int> arr) { int n=arr.size(); vector<int> index; for(int i=0; i<n-1; i++){ for(int j=i+1; j<n; j++){ if(arr[i]+arr[j]==m){ index.push_back(i+1); index.push_back(j+1); return index; } } } return index; }
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 →