C++ Easy Solution
If need explanation comment\nUpvotes are appreciated\n\nint numRescueBoats(vector<int>& nums, int limit) {\n        sort(nums.begin(),nums.end());\n        int 
**If need explanation comment**\n**Upvotes are appreciated**\n```\nint numRescueBoats(vector<int>& nums, int limit) {\n        sort(nums.begin(),nums.end());\n        int l=0,r=nums.size()-1,sum=0,ans=0;\n        while(l<=r){\n            if(l==r){\n                ans++;\n                break;\n            }\n            sum+=nums[l]+nums[r];\n            if(sum<=limit){\n                ans++;\n\t\t\t\tr--;\n\t\t\t\tl++;\n            }\n            else if(sum>limit){\n                ans++;\n                r--;\n            }\n            sum=0;\n        }\n        return ans;\n    }\n```
[]