Java | simple | NLogN
```\nclass Solution {\n    public boolean asteroidsDestroyed(int mass, int[] asteroids) {\n        Arrays.sort(asteroids);\n        long m = mass;\n        for(
```\nclass Solution {\n    public boolean asteroidsDestroyed(int mass, int[] asteroids) {\n        Arrays.sort(asteroids);\n        long m = mass;\n        for(int i=0;i<asteroids.length;i++){\n            if(asteroids[i] <= m){\n                m += asteroids[i];\n            }else {\n                return false;\n            }\n        }\n        return true;\n    }\n}
[]