C++ Solution
Simply Sort the elements so that the smallest mass aesteroid is hit first and if it is smaller than planet then it will be added to the mass of planet and do th
Simply Sort the elements so that the smallest mass aesteroid is hit first and if it is smaller than planet then it will be added to the mass of planet and do the same for the remaining array.\nlong long is taken because of the aestroid\'s mass being added to the planet.\n```\nbool asteroidsDestroyed(int mass, vector<int>& asteroids) {\n        long long m = mass;\n        sort(asteroids.begin(),asteroids.end());\n        for(int i=0;i<asteroids.size();i++){\n            if(asteroids[i]>m){\n                return false;\n            }\n            m+=asteroids[i];\n        }\n        return true;\n    }\n```
['Greedy', 'C']