c++ || easy solution  , with explanation ;)
->first we sort the asteroids , and then we iterate through the vector asteroids and keep checking if the mass of the asteroid is lesser than or equal to  sum (
->first we sort the asteroids , and then we iterate through the vector asteroids and keep checking if the mass of the asteroid is lesser than or equal to  sum ( initalized to mass ) , if its true , we add the asteroids mass to sum , else we return false\n->better take sum as a long long data type , casued overflow for int :/\n\nhave a doubt ? comment below :)\nfound it helpful ? do upvote ;)\n\n```\nclass Solution {\npublic:\n    bool asteroidsDestroyed(int mass, vector<int>& asteroids) {\nlong long sum=mass;\nsort(asteroids.begin() , asteroids.end());\nfor(int i=0 ; i<asteroids.size() ; i++)\n{\n    if(sum>=asteroids[i])\n    {\n        sum+=asteroids[i];\n    }\n    else return false;\n}\nreturn 1;\n    }\n};
['C', 'Sorting']