[Java] Sort and Check them 1 by 1...
\n    public boolean asteroidsDestroyed(int mass, int[] asteroids) {\n        Arrays.sort(asteroids);\n        long m = mass;\n        int len = asteroids.lengt
```\n    public boolean asteroidsDestroyed(int mass, int[] asteroids) {\n        Arrays.sort(asteroids);\n        long m = mass;\n        int len = asteroids.length;\n        for (int i = 0; i < len; i++) {\n            if (m >= asteroids[i]) {\n                m += asteroids[i];\n            } else {\n                return false;\n            }\n        }\n        return true;\n    }\n```
['Java']