Idea explained || Greedy Approach || C++ Clean code
Intuition :\n\n Idea is to simply sort the asteroids list. & then we need to collide planet with asteroid.\n There are 2 cases :\n\t If planetMass >= asteroid, 
**Intuition :**\n\n* Idea is to simply sort the `asteroids` list. & then we need to collide planet with asteroid.\n* There are 2 cases :\n\t* If `planetMass >= asteroid`, then we merge it. and continue\n\t\n\t* else we planet get destroyed, and `return false`. \n* In the end if all `asteroids` are collided, then `return true`\n* This is basically a Greedy approach and we need to simulate the collision process.\n# Code :\n\n```\nclass Solution {\npublic:\n    bool asteroidsDestroyed(int mass, vector<int>& asteroids) {\n        \n        int n = asteroids.size();\n        sort(begin(asteroids), end(asteroids));\n        \n        long long planetMass = mass;\n        \n        for(auto& asteroid : asteroids) {\n            if(planetMass < asteroid) return false; \n\t\t\tplanetMass += asteroid;\n        }\n        return true;\n    }\n};\n```\n\n**Complexity :**\n\n* Time : `O(NlogN + N)`, N is size of `asteroids` list\n* Space : `O(1)`
['Greedy', 'C', 'Sorting']