Simple Java Solution with Sorting
\nclass Solution {\n    public boolean asteroidsDestroyed(int mass, int[] a) {\n        long sum=mass;\n        Arrays.sort(a);\n        \n        for(int n:a){
```\nclass Solution {\n    public boolean asteroidsDestroyed(int mass, int[] a) {\n        long sum=mass;\n        Arrays.sort(a);\n        \n        for(int n:a){\n            if(n>sum) {\n              return false;  \n            }\n            else sum+=n;\n        }\n        \n        return true;\n    }\n}\n\n```
[]