✅ simple easy c++ solution
\nint numRescueBoats(vector<int>& people, int limit) \n    {\n        sort(people.begin(),people.end());\n        int i=0;\n        int j=people.size()-1;\n    
```\nint numRescueBoats(vector<int>& people, int limit) \n    {\n        sort(people.begin(),people.end());\n        int i=0;\n        int j=people.size()-1;\n        int count=0;\n        \n        while(i<=j)\n        {\n            if(people[i]+people[j]<=limit) i++;  // add light weight people with heavy weight people\n            j--;\n            count++;\n        }\n        return count;\n    }\n```
[]