Easy c++ solution
\nclass Solution {\npublic:\n    bool asteroidsDestroyed(int mass, vector<int>& arr) {\n        sort(arr.begin(),arr.end());\n        long long m = mass;\n     
```\nclass Solution {\npublic:\n    bool asteroidsDestroyed(int mass, vector<int>& arr) {\n        sort(arr.begin(),arr.end());\n        long long m = mass;\n        for(auto it:arr){\n            if(it <= m){\n                m += it;\n            }else{\n                return false;\n            }\n        }\n        return true;\n    }\n};\n```
['Greedy', 'C', 'C++']