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