You are viewing a single comment's thread. Return to all comments →
cpp
int toys(vector<int> w) { sort(w.begin(),w.end()); int counter=0; for(int i=0;i<w.size();i++){ int temp=w[i]; if(i<w.size()){ while(temp+4>=w[i]){ i++; } } i--; counter++; }
return counter; }
Priyanka and Toys
You are viewing a single comment's thread. Return to all comments →
cpp
return counter; }