C++ || Easy Solution || using sorting
\nclass Solution {\npublic:\n    bool asteroidsDestroyed(long long int mass, vector<int>& asteroids) {\n        long long  maximum = INT_MIN;\n        if(astero
```\nclass Solution {\npublic:\n    bool asteroidsDestroyed(long long int mass, vector<int>& asteroids) {\n        long long  maximum = INT_MIN;\n        if(asteroids.size() == 1){\n            return asteroids[0] <= mass;\n        }\n        sort(asteroids.begin(),asteroids.end());\n        for(int i = 0;i < asteroids.size() - 1;i++){\n            mass += asteroids[i];\n            if(mass < asteroids[i + 1]){\n                return false;\n            }\n        }\n        for(int i = 0;i < asteroids.size();i++){\n            if(asteroids[i] != maximum){\n                mass+=asteroids[i];\n            }\n        }\n        if(mass < maximum){\n            return false;\n        }\n        else{\n            return true;\n        }\n    }\n};\n```
['C', 'Sorting']