Simple || C++ solution
\nclass Solution {\npublic:\n    bool asteroidsDestroyed(long long mass, vector<int>& asteroids) {\n        sort(asteroids.begin(),asteroids.end());\n        in
```\nclass Solution {\npublic:\n    bool asteroidsDestroyed(long long mass, vector<int>& asteroids) {\n        sort(asteroids.begin(),asteroids.end());\n        int n=asteroids.size(),f=0;\n        for(int i=0;i<n;i++)\n        {\n            if(asteroids[i]<=mass)\n                mass+=asteroids[i];\n            else\n            {\n                f=1;\n                break;\n            }\n        }\n        if(f==1) return false;\n        else return true;\n    }\n};\n```
['C', 'Sorting', 'C++']